home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / isp3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-01-29  |  141.0 KB  |  3,577 lines

  1. unit isp3;
  2.  
  3. { NetManage Internet Controls }
  4. { Version 1.0 }
  5.  
  6. interface
  7.  
  8. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  9.  
  10. const
  11.   LIBID_NMOCODObjects: TGUID = '{B7FC35A4-8CE7-11CF-9754-00AA00C00908}';
  12.  
  13. const
  14.  
  15. { DocStateConstants }
  16.  
  17.   icDocNone = 0;
  18.   icDocBegin = 1;
  19.   icDocHeaders = 2;
  20.   icDocData = 3;
  21.   icDocError = 4;
  22.   icDocEnd = 5;
  23.  
  24. const
  25.  
  26. { Component class GUIDs }
  27.   Class_DocHeaderCls: TGUID = '{B7FC3591-8CE7-11CF-9754-00AA00C00908}';
  28.   Class_DocHeadersCls: TGUID = '{B7FC3593-8CE7-11CF-9754-00AA00C00908}';
  29.   Class_DocInputCls: TGUID = '{B7FC3596-8CE7-11CF-9754-00AA00C00908}';
  30.   Class_DocOutputCls: TGUID = '{B7FC3598-8CE7-11CF-9754-00AA00C00908}';
  31.   Class_icErrorCls: TGUID = '{B7FC35A1-8CE7-11CF-9754-00AA00C00908}';
  32.   Class_icErrorsCls: TGUID = '{B7FC35A3-8CE7-11CF-9754-00AA00C00908}';
  33.  
  34. type
  35.  
  36. { Forward declarations }
  37.   DocHeader = interface;
  38.   DDocHeader = dispinterface;
  39.   DocHeaders = interface;
  40.   DDocHeaders = dispinterface;
  41.   DocInput = interface;
  42.   DDocInput = dispinterface;
  43.   DocOutput = interface;
  44.   DDocOutput = dispinterface;
  45.   icError = interface;
  46.   DicError = dispinterface;
  47.   icErrors = interface;
  48.   DicErrors = dispinterface;
  49.  
  50.   DocStateConstants = TOleEnum;
  51.  
  52. { Internet DocHeader object properties and methods }
  53.  
  54.   DocHeader = interface(IDispatch)
  55.     ['{B7FC3590-8CE7-11CF-9754-00AA00C00908}']
  56.     function Get_Name: WideString; safecall;
  57.     procedure Set_Name(const Value: WideString); safecall;
  58.     function Get_Value: WideString; safecall;
  59.     procedure Set_Value(const Value: WideString); safecall;
  60.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); safecall;
  61.     property Name: WideString read Get_Name write Set_Name;
  62.     property Value: WideString read Get_Value write Set_Value;
  63.   end;
  64.  
  65. { DispInterface declaration for Dual Interface DocHeader }
  66.  
  67.   DDocHeader = dispinterface
  68.     ['{B7FC3590-8CE7-11CF-9754-00AA00C00908}']
  69.     property Name: WideString dispid 0;
  70.     property Value: WideString dispid 2;
  71.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); dispid 3;
  72.   end;
  73.  
  74. { Internet DocHeaders collection properties and methods }
  75.  
  76.   DocHeaders = interface(IDispatch)
  77.     ['{B7FC3592-8CE7-11CF-9754-00AA00C00908}']
  78.     function Get_Count: Integer; safecall;
  79.     function Get_Text: WideString; safecall;
  80.     procedure Set_Text(const Value: WideString); safecall;
  81.     function Get__NewEnum: IUnknown; safecall;
  82.     function Item(Index: OleVariant): DocHeader; safecall;
  83.     function Add(const Name, Value: WideString): DocHeader; safecall;
  84.     procedure Remove(Index: OleVariant); safecall;
  85.     procedure Clear; safecall;
  86.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); safecall;
  87.     property Count: Integer read Get_Count;
  88.     property Text: WideString read Get_Text write Set_Text;
  89.     property _NewEnum: IUnknown read Get__NewEnum;
  90.   end;
  91.  
  92. { DispInterface declaration for Dual Interface DocHeaders }
  93.  
  94.   DDocHeaders = dispinterface
  95.     ['{B7FC3592-8CE7-11CF-9754-00AA00C00908}']
  96.     property Count: Integer readonly dispid 1;
  97.     property Text: WideString dispid 2;
  98.     property _NewEnum: IUnknown readonly dispid -4;
  99.     function Item(Index: OleVariant): DocHeader; dispid 0;
  100.     function Add(const Name, Value: WideString): DocHeader; dispid 4;
  101.     procedure Remove(Index: OleVariant); dispid 5;
  102.     procedure Clear; dispid 6;
  103.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); dispid 7;
  104.   end;
  105.  
  106. { Internet DocInput object properties and methods }
  107.  
  108.   DocInput = interface(IDispatch)
  109.     ['{B7FC3595-8CE7-11CF-9754-00AA00C00908}']
  110.     function Get_Headers: DocHeaders; safecall;
  111.     function Get_State: DocStateConstants; safecall;
  112.     function Get_BytesTotal: Integer; safecall;
  113.     function Get_BytesTransferred: Integer; safecall;
  114.     function Get_FileName: WideString; safecall;
  115.     procedure Set_FileName(const Value: WideString); safecall;
  116.     function Get_DocLink: IUnknown; safecall;
  117.     procedure Set_DocLink(Value: IUnknown); safecall;
  118.     function Get_Suspended: WordBool; safecall;
  119.     function Get_PushStreamMode: WordBool; safecall;
  120.     procedure Set_PushStreamMode(Value: WordBool); safecall;
  121.     procedure GetData(out Data: OleVariant; Type_: OleVariant); safecall;
  122.     procedure SetData(Data: OleVariant); safecall;
  123.     procedure Suspend(Suspend: WordBool); safecall;
  124.     function Get_CPPObject: SYSINT; safecall;
  125.     procedure Set_CPPObject(Value: SYSINT); safecall;
  126.     procedure PushStream; safecall;
  127.     function Get_Tag: OleVariant; safecall;
  128.     procedure Set_Tag(Value: OleVariant); safecall;
  129.     function Get_Errors: icErrors; safecall;
  130.     function Get_URL: WideString; safecall;
  131.     property Headers: DocHeaders read Get_Headers;
  132.     property State: DocStateConstants read Get_State;
  133.     property BytesTotal: Integer read Get_BytesTotal;
  134.     property BytesTransferred: Integer read Get_BytesTransferred;
  135.     property FileName: WideString read Get_FileName write Set_FileName;
  136.     property DocLink: IUnknown read Get_DocLink write Set_DocLink;
  137.     property Suspended: WordBool read Get_Suspended;
  138.     property PushStreamMode: WordBool read Get_PushStreamMode write Set_PushStreamMode;
  139.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  140.     property Tag: OleVariant read Get_Tag write Set_Tag;
  141.     property Errors: icErrors read Get_Errors;
  142.     property URL: WideString read Get_URL;
  143.   end;
  144.  
  145. { DispInterface declaration for Dual Interface DocInput }
  146.  
  147.   DDocInput = dispinterface
  148.     ['{B7FC3595-8CE7-11CF-9754-00AA00C00908}']
  149.     property Headers: DocHeaders readonly dispid 2;
  150.     property State: DocStateConstants readonly dispid 3;
  151.     property BytesTotal: Integer readonly dispid 4;
  152.     property BytesTransferred: Integer readonly dispid 5;
  153.     property FileName: WideString dispid 6;
  154.     property DocLink: IUnknown dispid 7;
  155.     property Suspended: WordBool readonly dispid 11;
  156.     property PushStreamMode: WordBool dispid 12;
  157.     procedure GetData(out Data: OleVariant; Type_: OleVariant); dispid 9;
  158.     procedure SetData(Data: OleVariant); dispid 8;
  159.     procedure Suspend(Suspend: WordBool); dispid 10;
  160.     property CPPObject: SYSINT dispid 14;
  161.     procedure PushStream; dispid 13;
  162.     property Tag: OleVariant dispid 16;
  163.     property Errors: icErrors readonly dispid 17;
  164.     property URL: WideString readonly dispid 1;
  165.   end;
  166.  
  167. { Internet DocOutput object properties and methods }
  168.  
  169.   DocOutput = interface(IDispatch)
  170.     ['{B7FC3597-8CE7-11CF-9754-00AA00C00908}']
  171.     function Get_Headers: DocHeaders; safecall;
  172.     function Get_State: DocStateConstants; safecall;
  173.     function Get_BytesTotal: Integer; safecall;
  174.     function Get_BytesTransferred: Integer; safecall;
  175.     function Get_FileName: WideString; safecall;
  176.     procedure Set_FileName(const Value: WideString); safecall;
  177.     function Get_DocLink: IUnknown; safecall;
  178.     function Get_Suspended: WordBool; safecall;
  179.     function Get_PushStreamMode: WordBool; safecall;
  180.     function Get_DataString: WideString; safecall;
  181.     function Get_DataBlock: OleVariant; safecall;
  182.     procedure GetData(out Data: OleVariant; Type_: OleVariant); safecall;
  183.     procedure SetData(Data: OleVariant); safecall;
  184.     procedure Suspend(Suspend: WordBool); safecall;
  185.     function Get_CPPObject: SYSINT; safecall;
  186.     procedure Set_CPPObject(Value: SYSINT); safecall;
  187.     function Get_AppendToFile: WordBool; safecall;
  188.     procedure Set_AppendToFile(Value: WordBool); safecall;
  189.     function Get_Tag: OleVariant; safecall;
  190.     procedure Set_Tag(Value: OleVariant); safecall;
  191.     function Get_Errors: icErrors; safecall;
  192.     function Get_URL: WideString; safecall;
  193.     property Headers: DocHeaders read Get_Headers;
  194.     property State: DocStateConstants read Get_State;
  195.     property BytesTotal: Integer read Get_BytesTotal;
  196.     property BytesTransferred: Integer read Get_BytesTransferred;
  197.     property FileName: WideString read Get_FileName write Set_FileName;
  198.     property DocLink: IUnknown read Get_DocLink;
  199.     property Suspended: WordBool read Get_Suspended;
  200.     property PushStreamMode: WordBool read Get_PushStreamMode;
  201.     property DataString: WideString read Get_DataString;
  202.     property DataBlock: OleVariant read Get_DataBlock;
  203.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  204.     property AppendToFile: WordBool read Get_AppendToFile write Set_AppendToFile;
  205.     property Tag: OleVariant read Get_Tag write Set_Tag;
  206.     property Errors: icErrors read Get_Errors;
  207.     property URL: WideString read Get_URL;
  208.   end;
  209.  
  210. { DispInterface declaration for Dual Interface DocOutput }
  211.  
  212.   DDocOutput = dispinterface
  213.     ['{B7FC3597-8CE7-11CF-9754-00AA00C00908}']
  214.     property Headers: DocHeaders readonly dispid 2;
  215.     property State: DocStateConstants readonly dispid 3;
  216.     property BytesTotal: Integer readonly dispid 4;
  217.     property BytesTransferred: Integer readonly dispid 5;
  218.     property FileName: WideString dispid 6;
  219.     property DocLink: IUnknown readonly dispid 7;
  220.     property Suspended: WordBool readonly dispid 11;
  221.     property PushStreamMode: WordBool readonly dispid 12;
  222.     property DataString: WideString readonly dispid 19;
  223.     property DataBlock: OleVariant readonly dispid 18;
  224.     procedure GetData(out Data: OleVariant; Type_: OleVariant); dispid 9;
  225.     procedure SetData(Data: OleVariant); dispid 8;
  226.     procedure Suspend(Suspend: WordBool); dispid 10;
  227.     property CPPObject: SYSINT dispid 14;
  228.     property AppendToFile: WordBool dispid 15;
  229.     property Tag: OleVariant dispid 16;
  230.     property Errors: icErrors readonly dispid 17;
  231.     property URL: WideString readonly dispid 1;
  232.   end;
  233.  
  234. { Internet error object properties and methods }
  235.  
  236.   icError = interface(IDispatch)
  237.     ['{B7FC35A0-8CE7-11CF-9754-00AA00C00908}']
  238.     function Get_Type_: WideString; safecall;
  239.     function Get_Code: Integer; safecall;
  240.     function Get_Description: WideString; safecall;
  241.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); safecall;
  242.     procedure InitProperties(var  {IDL_In} ErrorType,  {IDL_In} ErrorDesc: WideString; var  {IDL_In} ErrorCode: Integer); safecall;
  243.     property Type_: WideString read Get_Type_;
  244.     property Code: Integer read Get_Code;
  245.     property Description: WideString read Get_Description;
  246.   end;
  247.  
  248. { DispInterface declaration for Dual Interface icError }
  249.  
  250.   DicError = dispinterface
  251.     ['{B7FC35A0-8CE7-11CF-9754-00AA00C00908}']
  252.     property Type_: WideString readonly dispid 0;
  253.     property Code: Integer readonly dispid 151;
  254.     property Description: WideString readonly dispid 152;
  255.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); dispid 154;
  256.     procedure InitProperties(var  {IDL_In} ErrorType,  {IDL_In} ErrorDesc: WideString; var  {IDL_In} ErrorCode: Integer); dispid 155;
  257.   end;
  258.  
  259. { Internet errors collection properties and methods }
  260.  
  261.   icErrors = interface(IDispatch)
  262.     ['{B7FC35A2-8CE7-11CF-9754-00AA00C00908}']
  263.     function Get_Count: Integer; safecall;
  264.     function Get_Source: OleVariant; safecall;
  265.     function Get__NewEnum: IUnknown; safecall;
  266.     function Item(Index: OleVariant): icError; safecall;
  267.     procedure Clear; safecall;
  268.     procedure SetItem(var  {IDL_In} ErrCode: Integer; var  {IDL_In} ErrType,  {IDL_In} ErrDesc: WideString); safecall;
  269.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); safecall;
  270.     procedure SetCollection(var  {IDL_In} initString: WideString); safecall;
  271.     property Count: Integer read Get_Count;
  272.     property Source: OleVariant read Get_Source;
  273.     property _NewEnum: IUnknown read Get__NewEnum;
  274.   end;
  275.  
  276. { DispInterface declaration for Dual Interface icErrors }
  277.  
  278.   DicErrors = dispinterface
  279.     ['{B7FC35A2-8CE7-11CF-9754-00AA00C00908}']
  280.     property Count: Integer readonly dispid 100;
  281.     property Source: OleVariant readonly dispid 102;
  282.     property _NewEnum: IUnknown readonly dispid -4;
  283.     function Item(Index: OleVariant): icError; dispid 0;
  284.     procedure Clear; dispid 103;
  285.     procedure SetItem(var  {IDL_In} ErrCode: Integer; var  {IDL_In} ErrType,  {IDL_In} ErrDesc: WideString); dispid 153;
  286.     procedure SetThisObject(var  {IDL_In} ThisObject: SYSINT); dispid 104;
  287.     procedure SetCollection(var  {IDL_In} initString: WideString); dispid 105;
  288.   end;
  289.  
  290. { Internet DocHeader object }
  291.  
  292.   DocHeaderCls = DocHeader;
  293.  
  294.   CoDocHeaderCls = class
  295.     class function Create: DocHeader;
  296.     class function CreateRemote(const MachineName: string): DocHeader;
  297.   end;
  298.  
  299. { Internet DocHeaders object }
  300.  
  301.   DocHeadersCls = DocHeaders;
  302.  
  303.   CoDocHeadersCls = class
  304.     class function Create: DocHeaders;
  305.     class function CreateRemote(const MachineName: string): DocHeaders;
  306.   end;
  307.  
  308. { Internet DocInput object }
  309.  
  310.   DocInputCls = DocInput;
  311.  
  312.   CoDocInputCls = class
  313.     class function Create: DocInput;
  314.     class function CreateRemote(const MachineName: string): DocInput;
  315.   end;
  316.  
  317. { Internet DocOutput object }
  318.  
  319.   DocOutputCls = DocOutput;
  320.  
  321.   CoDocOutputCls = class
  322.     class function Create: DocOutput;
  323.     class function CreateRemote(const MachineName: string): DocOutput;
  324.   end;
  325.  
  326. { Internet error object }
  327.  
  328.   icErrorCls = icError;
  329.  
  330.   CoicErrorCls = class
  331.     class function Create: icError;
  332.     class function CreateRemote(const MachineName: string): icError;
  333.   end;
  334.  
  335. { Internet errors collection }
  336.  
  337.   icErrorsCls = icErrors;
  338.  
  339.   CoicErrorsCls = class
  340.     class function Create: icErrors;
  341.     class function CreateRemote(const MachineName: string): icErrors;
  342.   end;
  343.  
  344. const
  345.   LIBID_FTPCTLib: TGUID = '{B7FC3542-8CE7-11CF-9754-00AA00C00908}';
  346.  
  347. const
  348.  
  349. { FTPFirewallModeConstants }
  350.  
  351.   ftpFirewallOff = 0;
  352.   ftpFirewallSite = 1;
  353.   ftpFirewallOpen = 2;
  354.   ftpFirewallUserLogin = 3;
  355.   ftpFirewallUserNoLogin = 4;
  356.   ftpFirewallManual = 5;
  357.  
  358. { FTPFirewallStateConstants }
  359.  
  360.   ftpFirewallBase = 1300;
  361.   ftpFirewallConnected = 1301;
  362.   ftpFirewallConnected_Msg = 1302;
  363.   ftpFirewallUser_OK = 1303;
  364.   ftpFirewallAuthorized = 1304;
  365.   ftpFirewallRemoteConnected = 1305;
  366.   ftpFirewallDisconnecting = 1306;
  367.  
  368. { NotificationModeConstants }
  369.  
  370.   icCompleteMode = 0;
  371.   icContinousMode = 1;
  372.  
  373. { BlockResultConstants }
  374.  
  375.   icBlockOK = 0;
  376.   icTimedOut = 1;
  377.   icErrorExit = 2;
  378.   icBlockCancel = 3;
  379.   icUserQuit = 4;
  380.  
  381. { StateConstants }
  382.  
  383.   prcConnecting = 1;
  384.   prcResolvingHost = 2;
  385.   prcHostResolved = 3;
  386.   prcConnected = 4;
  387.   prcDisconnecting = 5;
  388.   prcDisconnected = 6;
  389.  
  390. { TimeoutConstants }
  391.  
  392.   prcConnectTimeout = 1;
  393.   prcReceiveTimeout = 2;
  394.   prcUserTimeout = 65;
  395.  
  396. { FTPTypeConstants }
  397.  
  398.   ftpAscii = 0;
  399.   ftpEBCDIC = 1;
  400.   ftpImage = 2;
  401.   ftpBinary = 3;
  402.  
  403. { FTPModeConstants }
  404.  
  405.   ftpStream = 0;
  406.   ftpBlock = 1;
  407.   ftpCompressed = 2;
  408.  
  409. { FTPOperationConstants }
  410.  
  411.   ftpFile = 0;
  412.   ftpList = 1;
  413.   ftpNameList = 2;
  414.  
  415. { FTPProtocolStateConstants }
  416.  
  417.   ftpBase = 0;
  418.   ftpAuthentication = 1;
  419.   ftpTransaction = 2;
  420.  
  421. const
  422.  
  423. { Component class GUIDs }
  424.   Class_FTPDirItemCls: TGUID = '{B7FC3544-8CE7-11CF-9754-00AA00C00908}';
  425.   Class_Firewall: TGUID = '{71A0C640-E157-11CF-A306-00A0243B6C29}';
  426.   Class_FTP: TGUID = '{B7FC354C-8CE7-11CF-9754-00AA00C00908}';
  427.  
  428. type
  429.  
  430. { Forward declarations }
  431.   FTPDirItem = interface;
  432.   DFTPDirItem = dispinterface;
  433.   IFirewall = interface;
  434.   DFirewall = dispinterface;
  435.   INMOleControl = interface;
  436.   DNMOleControl = dispinterface;
  437.   DNMOleControlEvents = dispinterface;
  438.   INMOleClientControl = interface;
  439.   DNMOleClientControl = dispinterface;
  440.   DNMOleClientControlEvents = dispinterface;
  441.   INMOleAuthClientControl = interface;
  442.   DNMOleAuthClientControl = dispinterface;
  443.   DNMOleAuthClientControlEvents = dispinterface;
  444.   Iftpct = interface;
  445.   Dftpct = dispinterface;
  446.   DftpctEvents = dispinterface;
  447.  
  448.   FTPFirewallModeConstants = TOleEnum;
  449.   FTPFirewallStateConstants = TOleEnum;
  450.   NotificationModeConstants = TOleEnum;
  451.   BlockResultConstants = TOleEnum;
  452.   StateConstants = TOleEnum;
  453.   TimeoutConstants = TOleEnum;
  454.   MethodConstants = TOleEnum;
  455.   FTPTypeConstants = TOleEnum;
  456.   FTPModeConstants = TOleEnum;
  457.   FTPOperationConstants = TOleEnum;
  458.   FTPProtocolStateConstants = TOleEnum;
  459.  
  460. { FTP directory item properties and methods }
  461.  
  462.   FTPDirItem = interface(IDispatch)
  463.     ['{B7FC3543-8CE7-11CF-9754-00AA00C00908}']
  464.     function Get_Date: WideString; safecall;
  465.     function Get_Size: Integer; safecall;
  466.     function Get_Attributes: SYSINT; safecall;
  467.     function Get_Detail: WideString; safecall;
  468.     function Get_FileName: WideString; safecall;
  469.     property Date: WideString read Get_Date;
  470.     property Size: Integer read Get_Size;
  471.     property Attributes: SYSINT read Get_Attributes;
  472.     property Detail: WideString read Get_Detail;
  473.     property FileName: WideString read Get_FileName;
  474.   end;
  475.  
  476. { DispInterface declaration for Dual Interface FTPDirItem }
  477.  
  478.   DFTPDirItem = dispinterface
  479.     ['{B7FC3543-8CE7-11CF-9754-00AA00C00908}']
  480.     property Date: WideString readonly dispid 70;
  481.     property Size: Integer readonly dispid 71;
  482.     property Attributes: SYSINT readonly dispid 72;
  483.     property Detail: WideString readonly dispid 73;
  484.     property FileName: WideString readonly dispid 74;
  485.   end;
  486.  
  487. { FirewallObject }
  488.  
  489.   IFirewall = interface(IDispatch)
  490.     ['{7061DDA0-E157-11CF-A306-00A0243B6C29}']
  491.     function Get_Mode: Smallint; safecall;
  492.     procedure Set_Mode(Value: Smallint); safecall;
  493.     function Get_State: Smallint; safecall;
  494.     function Get_StateString: WideString; safecall;
  495.     function Get_Host: WideString; safecall;
  496.     procedure Set_Host(const Value: WideString); safecall;
  497.     function Get_Port: Integer; safecall;
  498.     procedure Set_Port(Value: Integer); safecall;
  499.     function Get_UserId: WideString; safecall;
  500.     procedure Set_UserId(const Value: WideString); safecall;
  501.     function Get_Password: WideString; safecall;
  502.     procedure Set_Password(const Value: WideString); safecall;
  503.     property Mode: Smallint read Get_Mode write Set_Mode;
  504.     property State: Smallint read Get_State;
  505.     property StateString: WideString read Get_StateString;
  506.     property Host: WideString read Get_Host write Set_Host;
  507.     property Port: Integer read Get_Port write Set_Port;
  508.     property UserId: WideString read Get_UserId write Set_UserId;
  509.     property Password: WideString read Get_Password write Set_Password;
  510.   end;
  511.  
  512. { DispInterface declaration for Dual Interface IFirewall }
  513.  
  514.   DFirewall = dispinterface
  515.     ['{7061DDA0-E157-11CF-A306-00A0243B6C29}']
  516.     property Mode: Smallint dispid 80;
  517.     property State: Smallint readonly dispid 81;
  518.     property StateString: WideString readonly dispid 92;
  519.     property Host: WideString dispid 82;
  520.     property Port: Integer dispid 83;
  521.     property UserId: WideString dispid 84;
  522.     property Password: WideString dispid 85;
  523.   end;
  524.  
  525. { NetManage Internet Control }
  526.  
  527.   INMOleControl = interface(IDispatch)
  528.     ['{B7FC35B6-8CE7-11CF-9754-00AA00C00908}']
  529.     function Get_Blocking: WordBool; safecall;
  530.     procedure Set_Blocking(Value: WordBool); safecall;
  531.     function Get_SleepTime: Integer; safecall;
  532.     procedure Set_SleepTime(Value: Integer); safecall;
  533.     function Get_BlockResult: Smallint; safecall;
  534.     procedure AboutBox; safecall;
  535.     property Blocking: WordBool read Get_Blocking write Set_Blocking;
  536.     property SleepTime: Integer read Get_SleepTime write Set_SleepTime;
  537.     property BlockResult: Smallint read Get_BlockResult;
  538.   end;
  539.  
  540. { DispInterface declaration for Dual Interface INMOleControl }
  541.  
  542.   DNMOleControl = dispinterface
  543.     ['{B7FC35B6-8CE7-11CF-9754-00AA00C00908}']
  544.     property Blocking: WordBool dispid 515;
  545.     property SleepTime: Integer dispid 516;
  546.     property BlockResult: Smallint readonly dispid 519;
  547.     procedure AboutBox; dispid -552;
  548.   end;
  549.  
  550. { NetManage Internet Control events }
  551.  
  552.   DNMOleControlEvents = dispinterface
  553.     ['{B7FC35B7-8CE7-11CF-9754-00AA00C00908}']
  554.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  555.   end;
  556.  
  557. { NetManage internet client control }
  558.  
  559.   INMOleClientControl = interface(INMOleControl)
  560.     ['{B7FC35B4-8CE7-11CF-9754-00AA00C00908}']
  561.     function Get_RemoteHost: WideString; safecall;
  562.     procedure Set_RemoteHost(const Value: WideString); safecall;
  563.     function Get_RemotePort: Integer; safecall;
  564.     procedure Set_RemotePort(Value: Integer); safecall;
  565.     function Get_State: Smallint; safecall;
  566.     function Get_ProtocolState: Smallint; safecall;
  567.     function Get_ReplyString: WideString; safecall;
  568.     function Get_ReplyCode: Integer; safecall;
  569.     function Get_Timeout(event: Smallint): Integer; safecall;
  570.     procedure Set_Timeout(event: Smallint; Value: Integer); safecall;
  571.     procedure Set_EnableTimer(event: Smallint; Value: WordBool); safecall;
  572.     function Get_Errors: icErrors; safecall;
  573.     function Get_Busy: WordBool; safecall;
  574.     function Get_NotificationMode: Smallint; safecall;
  575.     procedure Set_NotificationMode(Value: Smallint); safecall;
  576.     function Get_StateString: WideString; safecall;
  577.     function Get_ProtocolStateString: WideString; safecall;
  578.     function Get_Logging: WordBool; safecall;
  579.     procedure Set_Logging(Value: WordBool); safecall;
  580.     function Get_LocalPort: Integer; safecall;
  581.     procedure Set_LocalPort(Value: Integer); safecall;
  582.     function Get_SocketHandle: Integer; safecall;
  583.     procedure Cancel; safecall;
  584.     procedure Connect(RemoteHost, RemotePort: OleVariant); safecall;
  585.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  586.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  587.     property State: Smallint read Get_State;
  588.     property ProtocolState: Smallint read Get_ProtocolState;
  589.     property ReplyString: WideString read Get_ReplyString;
  590.     property ReplyCode: Integer read Get_ReplyCode;
  591.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  592.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  593.     property Errors: icErrors read Get_Errors;
  594.     property Busy: WordBool read Get_Busy;
  595.     property NotificationMode: Smallint read Get_NotificationMode write Set_NotificationMode;
  596.     property StateString: WideString read Get_StateString;
  597.     property ProtocolStateString: WideString read Get_ProtocolStateString;
  598.     property Logging: WordBool read Get_Logging write Set_Logging;
  599.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  600.     property SocketHandle: Integer read Get_SocketHandle;
  601.   end;
  602.  
  603. { DispInterface declaration for Dual Interface INMOleClientControl }
  604.  
  605.   DNMOleClientControl = dispinterface
  606.     ['{B7FC35B4-8CE7-11CF-9754-00AA00C00908}']
  607.     property RemoteHost: WideString dispid 0;
  608.     property RemotePort: Integer dispid 502;
  609.     property State: Smallint readonly dispid 503;
  610.     property ProtocolState: Smallint readonly dispid 504;
  611.     property ReplyString: WideString readonly dispid 505;
  612.     property ReplyCode: Integer readonly dispid 506;
  613.     property Timeout[event: Smallint]: Integer dispid 507;
  614.     property EnableTimer[event: Smallint]: WordBool writeonly dispid 513;
  615.     property Errors: icErrors readonly dispid 508;
  616.     property Busy: WordBool readonly dispid 509;
  617.     property NotificationMode: Smallint dispid 510;
  618.     property StateString: WideString readonly dispid 511;
  619.     property ProtocolStateString: WideString readonly dispid 512;
  620.     property Logging: WordBool dispid 514;
  621.     property LocalPort: Integer dispid 517;
  622.     property SocketHandle: Integer readonly dispid 518;
  623.     procedure Cancel; dispid 520;
  624.     procedure Connect(RemoteHost, RemotePort: OleVariant); dispid 521;
  625.   end;
  626.  
  627. { NetManage Internet Client control events }
  628.  
  629.   DNMOleClientControlEvents = dispinterface
  630.     ['{B7FC35B5-8CE7-11CF-9754-00AA00C00908}']
  631.     procedure Timeout(event: Smallint); dispid 551;
  632.     procedure Cancel; dispid 552;
  633.     procedure StateChanged(State: Smallint); dispid 553;
  634.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  635.     procedure Busy(isBusy: WordBool); dispid 555;
  636.     procedure Log; dispid 556;
  637.   end;
  638.  
  639. { NetManage Authenticated Client Control }
  640.  
  641.   INMOleAuthClientControl = interface(INMOleClientControl)
  642.     ['{B7FC35B0-8CE7-11CF-9754-00AA00C00908}']
  643.     function Get_UserId: WideString; safecall;
  644.     procedure Set_UserId(const Value: WideString); safecall;
  645.     function Get_Password: WideString; safecall;
  646.     procedure Set_Password(const Value: WideString); safecall;
  647.     procedure Authenticate(UserId, Password: OleVariant); safecall;
  648.     property UserId: WideString read Get_UserId write Set_UserId;
  649.     property Password: WideString read Get_Password write Set_Password;
  650.   end;
  651.  
  652. { DispInterface declaration for Dual Interface INMOleAuthClientControl }
  653.  
  654.   DNMOleAuthClientControl = dispinterface
  655.     ['{B7FC35B0-8CE7-11CF-9754-00AA00C00908}']
  656.     property UserId: WideString dispid 601;
  657.     property Password: WideString dispid 602;
  658.     procedure Authenticate(UserId, Password: OleVariant); dispid 610;
  659.   end;
  660.  
  661. { Event interface for NetManage Authenticated Client Control }
  662.  
  663.   DNMOleAuthClientControlEvents = dispinterface
  664.     ['{B7FC35B1-8CE7-11CF-9754-00AA00C00908}']
  665.   end;
  666.  
  667. { Properties/Methods for NetManage FTP Client Control }
  668.  
  669.   Iftpct = interface(INMOleAuthClientControl)
  670.     ['{B7FC354A-8CE7-11CF-9754-00AA00C00908}']
  671.     function Get_URL: WideString; safecall;
  672.     procedure Set_URL(const Value: WideString); safecall;
  673.     function Get_DocInput: DocInput; safecall;
  674.     function Get_DocOutput: DocOutput; safecall;
  675.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  676.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  677.     function Get_AppendToFile: WordBool; safecall;
  678.     procedure Set_AppendToFile(Value: WordBool); safecall;
  679.     function Get_ListItemNotify: WordBool; safecall;
  680.     procedure Set_ListItemNotify(Value: WordBool); safecall;
  681.     function Get_RemoteFile: WideString; safecall;
  682.     procedure Set_RemoteFile(const Value: WideString); safecall;
  683.     function Get_Operation: FTPOperationConstants; safecall;
  684.     function Get_PassiveMode: WordBool; safecall;
  685.     procedure Set_PassiveMode(Value: WordBool); safecall;
  686.     function Get_Firewall: IFirewall; safecall;
  687.     procedure Abort; safecall;
  688.     procedure Account(const Account: WideString); safecall;
  689.     procedure ChangeDir(const directory: WideString); safecall;
  690.     procedure CreateDir(const directory: WideString); safecall;
  691.     procedure DeleteDir(const directory: WideString); safecall;
  692.     procedure DeleteFile(const FileName: WideString); safecall;
  693.     procedure Quit; safecall;
  694.     procedure Help(const Help: WideString); safecall;
  695.     procedure Noop; safecall;
  696.     procedure Mode(ftpMode: FTPModeConstants); safecall;
  697.     procedure Type_(ftpType: FTPTypeConstants); safecall;
  698.     procedure List(const List: WideString); safecall;
  699.     procedure NameList(const NameList: WideString); safecall;
  700.     procedure ParentDir; safecall;
  701.     procedure PrintDir; safecall;
  702.     procedure Execute(const Execute: WideString); safecall;
  703.     procedure Status(const Status: WideString); safecall;
  704.     procedure PutFile(const srcFileName, destFileName: WideString); safecall;
  705.     procedure Reinitialize; safecall;
  706.     procedure System; safecall;
  707.     procedure GetFile(const srcFileName, destFileName: WideString); safecall;
  708.     procedure PutFileUnique(const FileName: WideString); safecall;
  709.     procedure Site(const Site: WideString); safecall;
  710.     property URL: WideString read Get_URL write Set_URL;
  711.     property DocInput: DocInput read Get_DocInput;
  712.     property DocOutput: DocOutput read Get_DocOutput;
  713.     property AppendToFile: WordBool read Get_AppendToFile write Set_AppendToFile;
  714.     property ListItemNotify: WordBool read Get_ListItemNotify write Set_ListItemNotify;
  715.     property RemoteFile: WideString read Get_RemoteFile write Set_RemoteFile;
  716.     property Operation: FTPOperationConstants read Get_Operation;
  717.     property PassiveMode: WordBool read Get_PassiveMode write Set_PassiveMode;
  718.     property Firewall: IFirewall read Get_Firewall;
  719.   end;
  720.  
  721. { DispInterface declaration for Dual Interface Iftpct }
  722.  
  723.   Dftpct = dispinterface
  724.     ['{B7FC354A-8CE7-11CF-9754-00AA00C00908}']
  725.     property URL: WideString dispid 1001;
  726.     property DocInput: DocInput readonly dispid 1002;
  727.     property DocOutput: DocOutput readonly dispid 1003;
  728.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  729.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  730.     property AppendToFile: WordBool dispid 1;
  731.     property ListItemNotify: WordBool dispid 2;
  732.     property RemoteFile: WideString dispid 3;
  733.     property Operation: FTPOperationConstants readonly dispid 5;
  734.     property PassiveMode: WordBool dispid 6;
  735.     property Firewall: IFirewall readonly dispid 86;
  736.     procedure Abort; dispid 8;
  737.     procedure Account(const Account: WideString); dispid 9;
  738.     procedure ChangeDir(const directory: WideString); dispid 10;
  739.     procedure CreateDir(const directory: WideString); dispid 11;
  740.     procedure DeleteDir(const directory: WideString); dispid 12;
  741.     procedure DeleteFile(const FileName: WideString); dispid 13;
  742.     procedure Quit; dispid 14;
  743.     procedure Help(const Help: WideString); dispid 16;
  744.     procedure Noop; dispid 18;
  745.     procedure Mode(ftpMode: FTPModeConstants); dispid 19;
  746.     procedure Type_(ftpType: FTPTypeConstants); dispid 20;
  747.     procedure List(const List: WideString); dispid 21;
  748.     procedure NameList(const NameList: WideString); dispid 22;
  749.     procedure ParentDir; dispid 23;
  750.     procedure PrintDir; dispid 24;
  751.     procedure Execute(const Execute: WideString); dispid 25;
  752.     procedure Status(const Status: WideString); dispid 26;
  753.     procedure PutFile(const srcFileName, destFileName: WideString); dispid 27;
  754.     procedure Reinitialize; dispid 28;
  755.     procedure System; dispid 29;
  756.     procedure GetFile(const srcFileName, destFileName: WideString); dispid 30;
  757.     procedure PutFileUnique(const FileName: WideString); dispid 31;
  758.     procedure Site(const Site: WideString); dispid 32;
  759.   end;
  760.  
  761. { FTP client control events }
  762.  
  763.   DftpctEvents = dispinterface
  764.     ['{B7FC354B-8CE7-11CF-9754-00AA00C00908}']
  765.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  766.     procedure Timeout(event: Smallint; var  {IDL_None} Continue: WordBool); dispid 551;
  767.     procedure Cancel; dispid 552;
  768.     procedure StateChanged(State: Smallint); dispid 553;
  769.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  770.     procedure Busy(isBusy: WordBool); dispid 555;
  771.     procedure Log; dispid 556;
  772.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  773.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  774.     procedure Abort; dispid 43;
  775.     procedure Account; dispid 44;
  776.     procedure ChangeDir; dispid 45;
  777.     procedure CreateDir; dispid 47;
  778.     procedure DeleteDir; dispid 48;
  779.     procedure DelFile; dispid 49;
  780.     procedure Help; dispid 54;
  781.     procedure Mode; dispid 55;
  782.     procedure Noop; dispid 56;
  783.     procedure ParentDir; dispid 57;
  784.     procedure PrintDir; dispid 58;
  785.     procedure Execute; dispid 60;
  786.     procedure Status; dispid 62;
  787.     procedure Reinitialize; dispid 63;
  788.     procedure System; dispid 64;
  789.     procedure Site; dispid 66;
  790.     procedure Type_; dispid 68;
  791.     procedure ListItem(const Item: FTPDirItem); dispid 67;
  792.     procedure FirewallStateChanged(sFirewallState: Smallint); dispid 90;
  793.   end;
  794.  
  795. { FTP directory item object }
  796.  
  797.   FTPDirItemCls = FTPDirItem;
  798.  
  799.   CoFTPDirItemCls = class
  800.     class function Create: FTPDirItem;
  801.     class function CreateRemote(const MachineName: string): FTPDirItem;
  802.   end;
  803.  
  804. { Firewall Object }
  805.  
  806.   Firewall = IFirewall;
  807.  
  808.   CoFirewall = class
  809.     class function Create: IFirewall;
  810.     class function CreateRemote(const MachineName: string): IFirewall;
  811.   end;
  812.  
  813. { NetManage FTP Client Control }
  814.  
  815.   TFTPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  816.   TFTPTimeout = procedure(Sender: TObject; event: Smallint; var  {IDL_None} Continue: WordBool) of object;
  817.   TFTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  818.   TFTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  819.   TFTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  820.   TFTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  821.   TFTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  822.   TFTPListItem = procedure(Sender: TObject; const Item: FTPDirItem) of object;
  823.   TFTPFirewallStateChanged = procedure(Sender: TObject; sFirewallState: Smallint) of object;
  824.  
  825.   TFTP = class(TOleControl)
  826.   private
  827.     FOnError: TFTPError;
  828.     FOnTimeout: TFTPTimeout;
  829.     FOnCancel: TNotifyEvent;
  830.     FOnStateChanged: TFTPStateChanged;
  831.     FOnProtocolStateChanged: TFTPProtocolStateChanged;
  832.     FOnBusy: TFTPBusy;
  833.     FOnLog: TNotifyEvent;
  834.     FOnDocInput: TFTPDocInput;
  835.     FOnDocOutput: TFTPDocOutput;
  836.     FOnAbort: TNotifyEvent;
  837.     FOnAccount: TNotifyEvent;
  838.     FOnChangeDir: TNotifyEvent;
  839.     FOnCreateDir: TNotifyEvent;
  840.     FOnDeleteDir: TNotifyEvent;
  841.     FOnDelFile: TNotifyEvent;
  842.     FOnHelp: TNotifyEvent;
  843.     FOnMode: TNotifyEvent;
  844.     FOnNoop: TNotifyEvent;
  845.     FOnParentDir: TNotifyEvent;
  846.     FOnPrintDir: TNotifyEvent;
  847.     FOnExecute: TNotifyEvent;
  848.     FOnStatus: TNotifyEvent;
  849.     FOnReinitialize: TNotifyEvent;
  850.     FOnSystem: TNotifyEvent;
  851.     FOnSite: TNotifyEvent;
  852.     FOnType_: TNotifyEvent;
  853.     FOnListItem: TFTPListItem;
  854.     FOnFirewallStateChanged: TFTPFirewallStateChanged;
  855.     FIntf: Iftpct;
  856.     function Get_Timeout(event: Smallint): Integer;
  857.     procedure Set_Timeout(event: Smallint; Value: Integer);
  858.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  859.     function Get_Errors: icErrors;
  860.     function Get_DocInput: DocInput;
  861.     function Get_DocOutput: DocOutput;
  862.     function Get_Firewall: IFirewall;
  863.   protected
  864.     procedure InitControlData; override;
  865.     procedure InitControlInterface(const Obj: IUnknown); override;
  866.   public
  867.     procedure AboutBox;
  868.     procedure Cancel;
  869.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  870.     procedure Authenticate(UserId, Password: OleVariant);
  871.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  872.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  873.     procedure Abort;
  874.     procedure Account(const Account: WideString);
  875.     procedure ChangeDir(const directory: WideString);
  876.     procedure CreateDir(const directory: WideString);
  877.     procedure DeleteDir(const directory: WideString);
  878.     procedure DeleteFile(const FileName: WideString);
  879.     procedure Quit;
  880.     procedure Help(const Help: WideString);
  881.     procedure Noop;
  882.     procedure Mode(ftpMode: FTPModeConstants);
  883.     procedure Type_(ftpType: FTPTypeConstants);
  884.     procedure List(const List: WideString);
  885.     procedure NameList(const NameList: WideString);
  886.     procedure ParentDir;
  887.     procedure PrintDir;
  888.     procedure Execute(const Execute: WideString);
  889.     procedure Status(const Status: WideString);
  890.     procedure PutFile(const srcFileName, destFileName: WideString);
  891.     procedure Reinitialize;
  892.     procedure System;
  893.     procedure GetFile(const srcFileName, destFileName: WideString);
  894.     procedure PutFileUnique(const FileName: WideString);
  895.     procedure Site(const Site: WideString);
  896.     property ControlInterface: Iftpct read FIntf;
  897.     property BlockResult: Smallint index 519 read GetSmallintProp;
  898.     property State: Smallint index 503 read GetSmallintProp;
  899.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  900.     property ReplyString: WideString index 505 read GetWideStringProp;
  901.     property ReplyCode: Integer index 506 read GetIntegerProp;
  902.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  903.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  904.     property Errors: icErrors read Get_Errors;
  905.     property Busy: WordBool index 509 read GetWordBoolProp;
  906.     property StateString: WideString index 511 read GetWideStringProp;
  907.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  908.     property SocketHandle: Integer index 518 read GetIntegerProp;
  909.     property DocInput: DocInput read Get_DocInput;
  910.     property DocOutput: DocOutput read Get_DocOutput;
  911.     property Operation: FTPOperationConstants index 5 read GetTOleEnumProp;
  912.     property Firewall: IFirewall read Get_Firewall;
  913.   published
  914.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  915.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  916.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  917.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  918.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  919.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  920.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  921.     property UserId: WideString index 601 read GetWideStringProp write SetWideStringProp stored False;
  922.     property Password: WideString index 602 read GetWideStringProp write SetWideStringProp stored False;
  923.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  924.     property AppendToFile: WordBool index 1 read GetWordBoolProp write SetWordBoolProp stored False;
  925.     property ListItemNotify: WordBool index 2 read GetWordBoolProp write SetWordBoolProp stored False;
  926.     property RemoteFile: WideString index 3 read GetWideStringProp write SetWideStringProp stored False;
  927.     property PassiveMode: WordBool index 6 read GetWordBoolProp write SetWordBoolProp stored False;
  928.     property OnError: TFTPError read FOnError write FOnError;
  929.     property OnTimeout: TFTPTimeout read FOnTimeout write FOnTimeout;
  930.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  931.     property OnStateChanged: TFTPStateChanged read FOnStateChanged write FOnStateChanged;
  932.     property OnProtocolStateChanged: TFTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  933.     property OnBusy: TFTPBusy read FOnBusy write FOnBusy;
  934.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  935.     property OnDocInput: TFTPDocInput read FOnDocInput write FOnDocInput;
  936.     property OnDocOutput: TFTPDocOutput read FOnDocOutput write FOnDocOutput;
  937.     property OnAbort: TNotifyEvent read FOnAbort write FOnAbort;
  938.     property OnAccount: TNotifyEvent read FOnAccount write FOnAccount;
  939.     property OnChangeDir: TNotifyEvent read FOnChangeDir write FOnChangeDir;
  940.     property OnCreateDir: TNotifyEvent read FOnCreateDir write FOnCreateDir;
  941.     property OnDeleteDir: TNotifyEvent read FOnDeleteDir write FOnDeleteDir;
  942.     property OnDelFile: TNotifyEvent read FOnDelFile write FOnDelFile;
  943.     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
  944.     property OnMode: TNotifyEvent read FOnMode write FOnMode;
  945.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  946.     property OnParentDir: TNotifyEvent read FOnParentDir write FOnParentDir;
  947.     property OnPrintDir: TNotifyEvent read FOnPrintDir write FOnPrintDir;
  948.     property OnExecute: TNotifyEvent read FOnExecute write FOnExecute;
  949.     property OnStatus: TNotifyEvent read FOnStatus write FOnStatus;
  950.     property OnReinitialize: TNotifyEvent read FOnReinitialize write FOnReinitialize;
  951.     property OnSystem: TNotifyEvent read FOnSystem write FOnSystem;
  952.     property OnSite: TNotifyEvent read FOnSite write FOnSite;
  953.     property OnType_: TNotifyEvent read FOnType_ write FOnType_;
  954.     property OnListItem: TFTPListItem read FOnListItem write FOnListItem;
  955.     property OnFirewallStateChanged: TFTPFirewallStateChanged read FOnFirewallStateChanged write FOnFirewallStateChanged;
  956.   end;
  957.  
  958. const
  959.   LIBID_HTMLObjects: TGUID = '{B7FC354D-8CE7-11CF-9754-00AA00C00908}';
  960.  
  961. { Component class GUIDs }
  962.   Class_HTMLElementCls: TGUID = '{B7FC3550-8CE7-11CF-9754-00AA00C00908}';
  963.   Class_HTMLFormCls: TGUID = '{B7FC3554-8CE7-11CF-9754-00AA00C00908}';
  964.   Class_HTMLFormsCls: TGUID = '{B7FC3557-8CE7-11CF-9754-00AA00C00908}';
  965.   Class_HTMLAttrCls: TGUID = '{B7FC3559-8CE7-11CF-9754-00AA00C00908}';
  966.   Class_HTMLAttrsCls: TGUID = '{B7FC355B-8CE7-11CF-9754-00AA00C00908}';
  967.   Class_HTML: TGUID = '{B7FC355E-8CE7-11CF-9754-00AA00C00908}';
  968.  
  969. type
  970.  
  971. { Forward declarations }
  972.   HTMLElement = interface;
  973.   DHTMLElement = dispinterface;
  974.   HTMLForm = interface;
  975.   DHTMLForm = dispinterface;
  976.   HTMLForms = interface;
  977.   DHTMLForms = dispinterface;
  978.   HTMLAttr = interface;
  979.   DHTMLAttr = dispinterface;
  980.   HTMLAttrs = interface;
  981.   DHTMLAttrs = dispinterface;
  982.   IHTML = interface;
  983.   DHTML = dispinterface;
  984.   DHTMLEvents = dispinterface;
  985.  
  986. { HTML Element properties and methods }
  987.  
  988.   HTMLElement = interface(IDispatch)
  989.     ['{B7FC354E-8CE7-11CF-9754-00AA00C00908}']
  990.   end;
  991.  
  992. { DispInterface declaration for Dual Interface HTMLElement }
  993.  
  994.   DHTMLElement = dispinterface
  995.     ['{B7FC354E-8CE7-11CF-9754-00AA00C00908}']
  996.   end;
  997.  
  998. { HTML Form properties and methods }
  999.  
  1000.   HTMLForm = interface(IDispatch)
  1001.     ['{B7FC3551-8CE7-11CF-9754-00AA00C00908}']
  1002.     function Get_Method: WideString; safecall;
  1003.     function Get_URL: WideString; safecall;
  1004.     function Get_URLEncodedBody: WideString; safecall;
  1005.     procedure RequestSubmit; safecall;
  1006.     function Get_CPPObject: SYSINT; safecall;
  1007.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1008.     property Method: WideString read Get_Method;
  1009.     property URL: WideString read Get_URL;
  1010.     property URLEncodedBody: WideString read Get_URLEncodedBody;
  1011.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1012.   end;
  1013.  
  1014. { DispInterface declaration for Dual Interface HTMLForm }
  1015.  
  1016.   DHTMLForm = dispinterface
  1017.     ['{B7FC3551-8CE7-11CF-9754-00AA00C00908}']
  1018.     property Method: WideString readonly dispid 1;
  1019.     property URL: WideString readonly dispid 2;
  1020.     property URLEncodedBody: WideString readonly dispid 3;
  1021.     procedure RequestSubmit; dispid 4;
  1022.     property CPPObject: SYSINT dispid 100;
  1023.   end;
  1024.  
  1025. { HTML Forms collection properties and methods }
  1026.  
  1027.   HTMLForms = interface(IDispatch)
  1028.     ['{B7FC3555-8CE7-11CF-9754-00AA00C00908}']
  1029.     function Get_Count: Integer; safecall;
  1030.     function Get__NewEnum: IUnknown; safecall;
  1031.     function Item(Index: OleVariant): HTMLForm; safecall;
  1032.     function Get_CPPObject: SYSINT; safecall;
  1033.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1034.     property Count: Integer read Get_Count;
  1035.     property _NewEnum: IUnknown read Get__NewEnum;
  1036.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1037.   end;
  1038.  
  1039. { DispInterface declaration for Dual Interface HTMLForms }
  1040.  
  1041.   DHTMLForms = dispinterface
  1042.     ['{B7FC3555-8CE7-11CF-9754-00AA00C00908}']
  1043.     property Count: Integer readonly dispid 1;
  1044.     property _NewEnum: IUnknown readonly dispid -4;
  1045.     function Item(Index: OleVariant): HTMLForm; dispid 2;
  1046.     property CPPObject: SYSINT dispid 100;
  1047.   end;
  1048.  
  1049. { HTML Attribute properties and methods }
  1050.  
  1051.   HTMLAttr = interface(IDispatch)
  1052.     ['{B7FC3558-8CE7-11CF-9754-00AA00C00908}']
  1053.     function Get_Name: WideString; safecall;
  1054.     function Get_Value: WideString; safecall;
  1055.     function Get_CPPObject: SYSINT; safecall;
  1056.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1057.     property Name: WideString read Get_Name;
  1058.     property Value: WideString read Get_Value;
  1059.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1060.   end;
  1061.  
  1062. { DispInterface declaration for Dual Interface HTMLAttr }
  1063.  
  1064.   DHTMLAttr = dispinterface
  1065.     ['{B7FC3558-8CE7-11CF-9754-00AA00C00908}']
  1066.     property Name: WideString readonly dispid 1;
  1067.     property Value: WideString readonly dispid 2;
  1068.     property CPPObject: SYSINT dispid 100;
  1069.   end;
  1070.  
  1071. { HTML Attributes collection properties and methods }
  1072.  
  1073.   HTMLAttrs = interface(IDispatch)
  1074.     ['{B7FC355A-8CE7-11CF-9754-00AA00C00908}']
  1075.     function Get_Count: Integer; safecall;
  1076.     function Get__NewEnum: IUnknown; safecall;
  1077.     function Item(Index: OleVariant): HTMLAttr; safecall;
  1078.     function Get_CPPObject: SYSINT; safecall;
  1079.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1080.     procedure Set_InternalCount(Value: Integer); safecall;
  1081.     property Count: Integer read Get_Count;
  1082.     property _NewEnum: IUnknown read Get__NewEnum;
  1083.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1084.     property InternalCount: Integer write Set_InternalCount;
  1085.   end;
  1086.  
  1087. { DispInterface declaration for Dual Interface HTMLAttrs }
  1088.  
  1089.   DHTMLAttrs = dispinterface
  1090.     ['{B7FC355A-8CE7-11CF-9754-00AA00C00908}']
  1091.     property Count: Integer readonly dispid 1;
  1092.     property _NewEnum: IUnknown readonly dispid -4;
  1093.     function Item(Index: OleVariant): HTMLAttr; dispid 2;
  1094.     property CPPObject: SYSINT dispid 100;
  1095.     property InternalCount: Integer writeonly dispid 3;
  1096.   end;
  1097.  
  1098. { Properties/Methods for NetManage HTML Control }
  1099.  
  1100.   IHTML = interface(INMOleControl)
  1101.     ['{B7FC355C-8CE7-11CF-9754-00AA00C00908}']
  1102.     function Get_DocInput: DocInput; safecall;
  1103.     function Get_DocOutput: DocOutput; safecall;
  1104.     function Get_URL: WideString; safecall;
  1105.     function Get_RequestURL: WideString; safecall;
  1106.     function Get_BaseURL: WideString; safecall;
  1107.     function Get_Forms: HTMLForms; safecall;
  1108.     function Get_TotalWidth: Integer; safecall;
  1109.     function Get_TotalHeight: Integer; safecall;
  1110.     function Get_RetrieveBytesTotal: Integer; safecall;
  1111.     function Get_RetrieveBytesDone: Integer; safecall;
  1112.     function Get_ParseDone: WordBool; safecall;
  1113.     function Get_LayoutDone: WordBool; safecall;
  1114.     function Get_DeferRetrieval: WordBool; safecall;
  1115.     procedure Set_DeferRetrieval(Value: WordBool); safecall;
  1116.     function Get_ViewSource: WordBool; safecall;
  1117.     procedure Set_ViewSource(Value: WordBool); safecall;
  1118.     function Get_RetainSource: WordBool; safecall;
  1119.     procedure Set_RetainSource(Value: WordBool); safecall;
  1120.     function Get_SourceText: WideString; safecall;
  1121.     function Get_ElemNotification: WordBool; safecall;
  1122.     procedure Set_ElemNotification(Value: WordBool); safecall;
  1123.     function Get_Timeout: Integer; safecall;
  1124.     procedure Set_Timeout(Value: Integer); safecall;
  1125.     function Get_Redraw: WordBool; safecall;
  1126.     procedure Set_Redraw(Value: WordBool); safecall;
  1127.     function Get_UnderlineLinks: WordBool; safecall;
  1128.     procedure Set_UnderlineLinks(Value: WordBool); safecall;
  1129.     function Get_UseDocColors: WordBool; safecall;
  1130.     procedure Set_UseDocColors(Value: WordBool); safecall;
  1131.     function Get_BackImage: WideString; safecall;
  1132.     procedure Set_BackImage(const Value: WideString); safecall;
  1133.     function Get_BackColor: TColor; safecall;
  1134.     procedure Set_BackColor(Value: TColor); safecall;
  1135.     function Get_ForeColor: TColor; safecall;
  1136.     procedure Set_ForeColor(Value: TColor); safecall;
  1137.     function Get_LinkColor: TColor; safecall;
  1138.     procedure Set_LinkColor(Value: TColor); safecall;
  1139.     function Get_VisitedColor: TColor; safecall;
  1140.     procedure Set_VisitedColor(Value: TColor); safecall;
  1141.     function Get_DocBackColor: TColor; safecall;
  1142.     function Get_DocForeColor: TColor; safecall;
  1143.     function Get_DocLinkColor: TColor; safecall;
  1144.     function Get_DocVisitedColor: TColor; safecall;
  1145.     function Get_Font: IFontDisp; safecall;
  1146.     procedure Set_Font(Value: IFontDisp); safecall;
  1147.     function Get_FixedFont: IFontDisp; safecall;
  1148.     procedure Set_FixedFont(Value: IFontDisp); safecall;
  1149.     function Get_Heading1Font: IFontDisp; safecall;
  1150.     procedure Set_Heading1Font(Value: IFontDisp); safecall;
  1151.     function Get_Heading2Font: IFontDisp; safecall;
  1152.     procedure Set_Heading2Font(Value: IFontDisp); safecall;
  1153.     function Get_Heading3Font: IFontDisp; safecall;
  1154.     procedure Set_Heading3Font(Value: IFontDisp); safecall;
  1155.     function Get_Heading4Font: IFontDisp; safecall;
  1156.     procedure Set_Heading4Font(Value: IFontDisp); safecall;
  1157.     function Get_Heading5Font: IFontDisp; safecall;
  1158.     procedure Set_Heading5Font(Value: IFontDisp); safecall;
  1159.     function Get_Heading6Font: IFontDisp; safecall;
  1160.     procedure Set_Heading6Font(Value: IFontDisp); safecall;
  1161.     function Get_IsPrintingDone(PageNumber: Integer): WordBool; safecall;
  1162.     procedure RequestDoc(const URL: WideString); safecall;
  1163.     procedure RequestAllEmbedded; safecall;
  1164.     procedure Cancel(Message: OleVariant); safecall;
  1165.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant); safecall;
  1166.     procedure PrintPage(hDC, PageNumber: Integer); safecall;
  1167.     procedure EndPrinting; safecall;
  1168.     procedure AutoPrint(hDC: Integer); safecall;
  1169.     function Get_Errors: icErrors; safecall;
  1170.     function Get_hWnd: OLE_HANDLE; safecall;
  1171.     function GetPlainText(selected, fancy: WordBool): WideString; safecall;
  1172.     function HasSelection: WordBool; safecall;
  1173.     procedure SelectAll; safecall;
  1174.     property DocInput: DocInput read Get_DocInput;
  1175.     property DocOutput: DocOutput read Get_DocOutput;
  1176.     property URL: WideString read Get_URL;
  1177.     property RequestURL: WideString read Get_RequestURL;
  1178.     property BaseURL: WideString read Get_BaseURL;
  1179.     property Forms: HTMLForms read Get_Forms;
  1180.     property TotalWidth: Integer read Get_TotalWidth;
  1181.     property TotalHeight: Integer read Get_TotalHeight;
  1182.     property RetrieveBytesTotal: Integer read Get_RetrieveBytesTotal;
  1183.     property RetrieveBytesDone: Integer read Get_RetrieveBytesDone;
  1184.     property ParseDone: WordBool read Get_ParseDone;
  1185.     property LayoutDone: WordBool read Get_LayoutDone;
  1186.     property DeferRetrieval: WordBool read Get_DeferRetrieval write Set_DeferRetrieval;
  1187.     property ViewSource: WordBool read Get_ViewSource write Set_ViewSource;
  1188.     property RetainSource: WordBool read Get_RetainSource write Set_RetainSource;
  1189.     property SourceText: WideString read Get_SourceText;
  1190.     property ElemNotification: WordBool read Get_ElemNotification write Set_ElemNotification;
  1191.     property Timeout: Integer read Get_Timeout write Set_Timeout;
  1192.     property Redraw: WordBool read Get_Redraw write Set_Redraw;
  1193.     property UnderlineLinks: WordBool read Get_UnderlineLinks write Set_UnderlineLinks;
  1194.     property UseDocColors: WordBool read Get_UseDocColors write Set_UseDocColors;
  1195.     property BackImage: WideString read Get_BackImage write Set_BackImage;
  1196.     property BackColor: TColor read Get_BackColor write Set_BackColor;
  1197.     property ForeColor: TColor read Get_ForeColor write Set_ForeColor;
  1198.     property LinkColor: TColor read Get_LinkColor write Set_LinkColor;
  1199.     property VisitedColor: TColor read Get_VisitedColor write Set_VisitedColor;
  1200.     property DocBackColor: TColor read Get_DocBackColor;
  1201.     property DocForeColor: TColor read Get_DocForeColor;
  1202.     property DocLinkColor: TColor read Get_DocLinkColor;
  1203.     property DocVisitedColor: TColor read Get_DocVisitedColor;
  1204.     property Font: IFontDisp read Get_Font write Set_Font;
  1205.     property FixedFont: IFontDisp read Get_FixedFont write Set_FixedFont;
  1206.     property Heading1Font: IFontDisp read Get_Heading1Font write Set_Heading1Font;
  1207.     property Heading2Font: IFontDisp read Get_Heading2Font write Set_Heading2Font;
  1208.     property Heading3Font: IFontDisp read Get_Heading3Font write Set_Heading3Font;
  1209.     property Heading4Font: IFontDisp read Get_Heading4Font write Set_Heading4Font;
  1210.     property Heading5Font: IFontDisp read Get_Heading5Font write Set_Heading5Font;
  1211.     property Heading6Font: IFontDisp read Get_Heading6Font write Set_Heading6Font;
  1212.     property IsPrintingDone[PageNumber: Integer]: WordBool read Get_IsPrintingDone;
  1213.     property Errors: icErrors read Get_Errors;
  1214.     property hWnd: OLE_HANDLE read Get_hWnd;
  1215.   end;
  1216.  
  1217. { DispInterface declaration for Dual Interface IHTML }
  1218.  
  1219.   DHTML = dispinterface
  1220.     ['{B7FC355C-8CE7-11CF-9754-00AA00C00908}']
  1221.     property DocInput: DocInput readonly dispid 1002;
  1222.     property DocOutput: DocOutput readonly dispid 1003;
  1223.     property URL: WideString readonly dispid 1001;
  1224.     property RequestURL: WideString readonly dispid 2;
  1225.     property BaseURL: WideString readonly dispid 3;
  1226.     property Forms: HTMLForms readonly dispid 4;
  1227.     property TotalWidth: Integer readonly dispid 5;
  1228.     property TotalHeight: Integer readonly dispid 6;
  1229.     property RetrieveBytesTotal: Integer readonly dispid 7;
  1230.     property RetrieveBytesDone: Integer readonly dispid 8;
  1231.     property ParseDone: WordBool readonly dispid 9;
  1232.     property LayoutDone: WordBool readonly dispid 10;
  1233.     property DeferRetrieval: WordBool dispid 11;
  1234.     property ViewSource: WordBool dispid 12;
  1235.     property RetainSource: WordBool dispid 13;
  1236.     property SourceText: WideString readonly dispid 14;
  1237.     property ElemNotification: WordBool dispid 15;
  1238.     property Timeout: Integer dispid 507;
  1239.     property Redraw: WordBool dispid 17;
  1240.     property UnderlineLinks: WordBool dispid 18;
  1241.     property UseDocColors: WordBool dispid 19;
  1242.     property BackImage: WideString dispid 20;
  1243.     property BackColor: TColor dispid -501;
  1244.     property ForeColor: TColor dispid -513;
  1245.     property LinkColor: TColor dispid 21;
  1246.     property VisitedColor: TColor dispid 22;
  1247.     property DocBackColor: TColor readonly dispid 23;
  1248.     property DocForeColor: TColor readonly dispid 24;
  1249.     property DocLinkColor: TColor readonly dispid 25;
  1250.     property DocVisitedColor: TColor readonly dispid 26;
  1251.     property Font: IFontDisp dispid -512;
  1252.     property FixedFont: IFontDisp dispid 27;
  1253.     property Heading1Font: IFontDisp dispid 28;
  1254.     property Heading2Font: IFontDisp dispid 29;
  1255.     property Heading3Font: IFontDisp dispid 30;
  1256.     property Heading4Font: IFontDisp dispid 31;
  1257.     property Heading5Font: IFontDisp dispid 32;
  1258.     property Heading6Font: IFontDisp dispid 33;
  1259.     property IsPrintingDone[PageNumber: Integer]: WordBool readonly dispid 39;
  1260.     procedure RequestDoc(const URL: WideString); dispid 34;
  1261.     procedure RequestAllEmbedded; dispid 35;
  1262.     procedure Cancel(Message: OleVariant); dispid 520;
  1263.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant); dispid 36;
  1264.     procedure PrintPage(hDC, PageNumber: Integer); dispid 37;
  1265.     procedure EndPrinting; dispid 38;
  1266.     procedure AutoPrint(hDC: Integer); dispid 50;
  1267.     property Errors: icErrors readonly dispid 508;
  1268.     property hWnd: OLE_HANDLE readonly dispid -515;
  1269.     function GetPlainText(selected, fancy: WordBool): WideString; dispid 41;
  1270.     function HasSelection: WordBool; dispid 42;
  1271.     procedure SelectAll; dispid 43;
  1272.   end;
  1273.  
  1274. { HTML Control events }
  1275.  
  1276.   DHTMLEvents = dispinterface
  1277.     ['{B7FC355D-8CE7-11CF-9754-00AA00C00908}']
  1278.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  1279.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  1280.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1281.     procedure ParseComplete; dispid 1;
  1282.     procedure LayoutComplete; dispid 2;
  1283.     procedure Timeout; dispid 551;
  1284.     procedure BeginRetrieval; dispid 4;
  1285.     procedure UpdateRetrieval; dispid 5;
  1286.     procedure EndRetrieval; dispid 6;
  1287.     procedure DoRequestDoc(const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool); dispid 7;
  1288.     procedure DoRequestEmbedded(const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool); dispid 8;
  1289.     procedure DoRequestSubmit(const URL: WideString; const Form: HTMLForm; const DocOutput: DocOutput; var EnableDefault: WordBool); dispid 9;
  1290.     procedure DoNewElement(const ElemType: WideString; EndTag: WordBool; const Attrs: HTMLAttrs; const text: WideString; var EnableDefault: WordBool); dispid 10;
  1291.     procedure KeyPress(KeyAscii: Smallint); dispid -603;
  1292.     procedure KeyDown(KeyCode, Shift: Smallint); dispid -602;
  1293.     procedure KeyUp(KeyCode, Shift: Smallint); dispid -604;
  1294.     procedure Click; dispid -600;
  1295.     procedure DblClick; dispid -601;
  1296.     procedure MouseDown(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -605;
  1297.     procedure MouseMove(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -606;
  1298.     procedure MouseUp(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -607;
  1299.   end;
  1300.  
  1301. { HTML Element }
  1302.  
  1303.   HTMLElementCls = HTMLElement;
  1304.  
  1305.   CoHTMLElementCls = class
  1306.     class function Create: HTMLElement;
  1307.     class function CreateRemote(const MachineName: string): HTMLElement;
  1308.   end;
  1309.  
  1310. { HTML Form object }
  1311.  
  1312.   HTMLFormCls = HTMLForm;
  1313.  
  1314.   CoHTMLFormCls = class
  1315.     class function Create: HTMLForm;
  1316.     class function CreateRemote(const MachineName: string): HTMLForm;
  1317.   end;
  1318.  
  1319. { HTML Forms collection }
  1320.  
  1321.   HTMLFormsCls = HTMLForms;
  1322.  
  1323.   CoHTMLFormsCls = class
  1324.     class function Create: HTMLForms;
  1325.     class function CreateRemote(const MachineName: string): HTMLForms;
  1326.   end;
  1327.  
  1328. { HTML Attribute object }
  1329.  
  1330.   HTMLAttrCls = HTMLAttr;
  1331.  
  1332.   CoHTMLAttrCls = class
  1333.     class function Create: HTMLAttr;
  1334.     class function CreateRemote(const MachineName: string): HTMLAttr;
  1335.   end;
  1336.  
  1337. { HTML Attributes collection }
  1338.  
  1339.   HTMLAttrsCls = HTMLAttrs;
  1340.  
  1341.   CoHTMLAttrsCls = class
  1342.     class function Create: HTMLAttrs;
  1343.     class function CreateRemote(const MachineName: string): HTMLAttrs;
  1344.   end;
  1345.  
  1346. { NetManage HTML Client Control }
  1347.  
  1348.   THTMLError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  1349.   THTMLDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  1350.   THTMLDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1351.   THTMLDoRequestDoc = procedure(Sender: TObject; const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool) of object;
  1352.   THTMLDoRequestEmbedded = procedure(Sender: TObject; const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool) of object;
  1353.   THTMLDoRequestSubmit = procedure(Sender: TObject; const URL: WideString; const Form: HTMLForm; const DocOutput: DocOutput; var EnableDefault: WordBool) of object;
  1354.   THTMLDoNewElement = procedure(Sender: TObject; const ElemType: WideString; EndTag: WordBool; const Attrs: HTMLAttrs; const text: WideString; var EnableDefault: WordBool) of object;
  1355.  
  1356.   THTML = class(TOleControl)
  1357.   private
  1358.     FOnError: THTMLError;
  1359.     FOnDocInput: THTMLDocInput;
  1360.     FOnDocOutput: THTMLDocOutput;
  1361.     FOnParseComplete: TNotifyEvent;
  1362.     FOnLayoutComplete: TNotifyEvent;
  1363.     FOnTimeout: TNotifyEvent;
  1364.     FOnBeginRetrieval: TNotifyEvent;
  1365.     FOnUpdateRetrieval: TNotifyEvent;
  1366.     FOnEndRetrieval: TNotifyEvent;
  1367.     FOnDoRequestDoc: THTMLDoRequestDoc;
  1368.     FOnDoRequestEmbedded: THTMLDoRequestEmbedded;
  1369.     FOnDoRequestSubmit: THTMLDoRequestSubmit;
  1370.     FOnDoNewElement: THTMLDoNewElement;
  1371.     FIntf: IHTML;
  1372.     function Get_DocInput: DocInput;
  1373.     function Get_DocOutput: DocOutput;
  1374.     function Get_Forms: HTMLForms;
  1375.     function Get_IsPrintingDone(PageNumber: Integer): WordBool;
  1376.     function Get_Errors: icErrors;
  1377.     function Get_hWnd: OLE_HANDLE;
  1378.   protected
  1379.     procedure InitControlData; override;
  1380.     procedure InitControlInterface(const Obj: IUnknown); override;
  1381.   public
  1382.     procedure AboutBox;
  1383.     procedure RequestDoc(const URL: WideString);
  1384.     procedure RequestAllEmbedded;
  1385.     procedure Cancel(Message: OleVariant);
  1386.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant);
  1387.     procedure PrintPage(hDC, PageNumber: Integer);
  1388.     procedure EndPrinting;
  1389.     procedure AutoPrint(hDC: Integer);
  1390.     function GetPlainText(selected, fancy: WordBool): WideString;
  1391.     function HasSelection: WordBool;
  1392.     procedure SelectAll;
  1393.     property ControlInterface: IHTML read FIntf;
  1394.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1395.     property DocInput: DocInput read Get_DocInput;
  1396.     property DocOutput: DocOutput read Get_DocOutput;
  1397.     property URL: WideString index 1001 read GetWideStringProp;
  1398.     property RequestURL: WideString index 2 read GetWideStringProp;
  1399.     property BaseURL: WideString index 3 read GetWideStringProp;
  1400.     property Forms: HTMLForms read Get_Forms;
  1401.     property TotalWidth: Integer index 5 read GetIntegerProp;
  1402.     property TotalHeight: Integer index 6 read GetIntegerProp;
  1403.     property RetrieveBytesTotal: Integer index 7 read GetIntegerProp;
  1404.     property RetrieveBytesDone: Integer index 8 read GetIntegerProp;
  1405.     property ParseDone: WordBool index 9 read GetWordBoolProp;
  1406.     property LayoutDone: WordBool index 10 read GetWordBoolProp;
  1407.     property SourceText: WideString index 14 read GetWideStringProp;
  1408.     property DocBackColor: TColor index 23 read GetTColorProp;
  1409.     property DocForeColor: TColor index 24 read GetTColorProp;
  1410.     property DocLinkColor: TColor index 25 read GetTColorProp;
  1411.     property DocVisitedColor: TColor index 26 read GetTColorProp;
  1412.     property IsPrintingDone[PageNumber: Integer]: WordBool read Get_IsPrintingDone;
  1413.     property Errors: icErrors read Get_Errors;
  1414.     property hWnd: OLE_HANDLE read Get_hWnd;
  1415.   published
  1416.     property Align;
  1417.     property ParentColor;
  1418.     property ParentFont;
  1419.     property TabStop;
  1420.     property DragCursor;
  1421.     property DragMode;
  1422.     property ParentShowHint;
  1423.     property PopupMenu;
  1424.     property ShowHint;
  1425.     property TabOrder;
  1426.     property Visible;
  1427.     property OnDragDrop;
  1428.     property OnDragOver;
  1429.     property OnEndDrag;
  1430.     property OnEnter;
  1431.     property OnExit;
  1432.     property OnStartDrag;
  1433.     property OnMouseUp;
  1434.     property OnMouseMove;
  1435.     property OnMouseDown;
  1436.     property OnKeyUp;
  1437.     property OnKeyPress;
  1438.     property OnKeyDown;
  1439.     property OnDblClick;
  1440.     property OnClick;
  1441.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1442.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1443.     property DeferRetrieval: WordBool index 11 read GetWordBoolProp write SetWordBoolProp stored False;
  1444.     property ViewSource: WordBool index 12 read GetWordBoolProp write SetWordBoolProp stored False;
  1445.     property RetainSource: WordBool index 13 read GetWordBoolProp write SetWordBoolProp stored False;
  1446.     property ElemNotification: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
  1447.     property Timeout: Integer index 507 read GetIntegerProp write SetIntegerProp stored False;
  1448.     property Redraw: WordBool index 17 read GetWordBoolProp write SetWordBoolProp stored False;
  1449.     property UnderlineLinks: WordBool index 18 read GetWordBoolProp write SetWordBoolProp stored False;
  1450.     property UseDocColors: WordBool index 19 read GetWordBoolProp write SetWordBoolProp stored False;
  1451.     property BackImage: WideString index 20 read GetWideStringProp write SetWideStringProp stored False;
  1452.     property BackColor: TColor index -501 read GetTColorProp write SetTColorProp stored False;
  1453.     property ForeColor: TColor index -513 read GetTColorProp write SetTColorProp stored False;
  1454.     property LinkColor: TColor index 21 read GetTColorProp write SetTColorProp stored False;
  1455.     property VisitedColor: TColor index 22 read GetTColorProp write SetTColorProp stored False;
  1456.     property Font: TFont index -512 read GetTFontProp write SetTFontProp stored False;
  1457.     property FixedFont: TFont index 27 read GetTFontProp write SetTFontProp stored False;
  1458.     property Heading1Font: TFont index 28 read GetTFontProp write SetTFontProp stored False;
  1459.     property Heading2Font: TFont index 29 read GetTFontProp write SetTFontProp stored False;
  1460.     property Heading3Font: TFont index 30 read GetTFontProp write SetTFontProp stored False;
  1461.     property Heading4Font: TFont index 31 read GetTFontProp write SetTFontProp stored False;
  1462.     property Heading5Font: TFont index 32 read GetTFontProp write SetTFontProp stored False;
  1463.     property Heading6Font: TFont index 33 read GetTFontProp write SetTFontProp stored False;
  1464.     property OnError: THTMLError read FOnError write FOnError;
  1465.     property OnDocInput: THTMLDocInput read FOnDocInput write FOnDocInput;
  1466.     property OnDocOutput: THTMLDocOutput read FOnDocOutput write FOnDocOutput;
  1467.     property OnParseComplete: TNotifyEvent read FOnParseComplete write FOnParseComplete;
  1468.     property OnLayoutComplete: TNotifyEvent read FOnLayoutComplete write FOnLayoutComplete;
  1469.     property OnTimeout: TNotifyEvent read FOnTimeout write FOnTimeout;
  1470.     property OnBeginRetrieval: TNotifyEvent read FOnBeginRetrieval write FOnBeginRetrieval;
  1471.     property OnUpdateRetrieval: TNotifyEvent read FOnUpdateRetrieval write FOnUpdateRetrieval;
  1472.     property OnEndRetrieval: TNotifyEvent read FOnEndRetrieval write FOnEndRetrieval;
  1473.     property OnDoRequestDoc: THTMLDoRequestDoc read FOnDoRequestDoc write FOnDoRequestDoc;
  1474.     property OnDoRequestEmbedded: THTMLDoRequestEmbedded read FOnDoRequestEmbedded write FOnDoRequestEmbedded;
  1475.     property OnDoRequestSubmit: THTMLDoRequestSubmit read FOnDoRequestSubmit write FOnDoRequestSubmit;
  1476.     property OnDoNewElement: THTMLDoNewElement read FOnDoNewElement write FOnDoNewElement;
  1477.   end;
  1478.  
  1479. const
  1480.   LIBID_HTTPCTLib: TGUID = '{B7FC355F-8CE7-11CF-9754-00AA00C00908}';
  1481.  
  1482. { HTTPProtocolStateConstants }
  1483.  
  1484.   httpBase = 0;
  1485.   httpTransferring = 1;
  1486.  
  1487. { Component class GUIDs }
  1488.   Class_Proxy: TGUID = '{70F78900-F452-11CF-A306-00A0243B6C29}';
  1489.   Class_HTTP: TGUID = '{B7FC3563-8CE7-11CF-9754-00AA00C00908}';
  1490.  
  1491. type
  1492.  
  1493. { Forward declarations }
  1494.   IHttpProxy = interface;
  1495.   DHttpProxy = dispinterface;
  1496.   IHTTPCT = interface;
  1497.   DHTTPCT = dispinterface;
  1498.   DHTTPCTEvents = dispinterface;
  1499.  
  1500.   HTTPProtocolStateConstants = TOleEnum;
  1501.  
  1502. { Proxy Object }
  1503.  
  1504.   IHttpProxy = interface(IDispatch)
  1505.     ['{6FB8A060-F452-11CF-A306-00A0243B6C29}']
  1506.     function Get_Mode: WordBool; safecall;
  1507.     procedure Set_Mode(Value: WordBool); safecall;
  1508.     function Get_Host: WideString; safecall;
  1509.     procedure Set_Host(const Value: WideString); safecall;
  1510.     function Get_Port: Integer; safecall;
  1511.     procedure Set_Port(Value: Integer); safecall;
  1512.     property Mode: WordBool read Get_Mode write Set_Mode;
  1513.     property Host: WideString read Get_Host write Set_Host;
  1514.     property Port: Integer read Get_Port write Set_Port;
  1515.   end;
  1516.  
  1517. { DispInterface declaration for Dual Interface IHttpProxy }
  1518.  
  1519.   DHttpProxy = dispinterface
  1520.     ['{6FB8A060-F452-11CF-A306-00A0243B6C29}']
  1521.     property Mode: WordBool dispid 20;
  1522.     property Host: WideString dispid 22;
  1523.     property Port: Integer dispid 23;
  1524.   end;
  1525.  
  1526. { Properties/Methods for NetManage HTTP Client Control }
  1527.  
  1528.   IHTTPCT = interface(INMOleClientControl)
  1529.     ['{B7FC3561-8CE7-11CF-9754-00AA00C00908}']
  1530.     function Get_Document: WideString; safecall;
  1531.     procedure Set_Document(const Value: WideString); safecall;
  1532.     function Get_Method: MethodConstants; safecall;
  1533.     procedure Set_Method(Value: MethodConstants); safecall;
  1534.     function Get_URL: WideString; safecall;
  1535.     procedure Set_URL(const Value: WideString); safecall;
  1536.     function Get_DocInput: DocInput; safecall;
  1537.     function Get_DocOutput: DocOutput; safecall;
  1538.     function Get_Proxy: IHttpProxy; safecall;
  1539.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  1540.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1541.     property Document: WideString read Get_Document write Set_Document;
  1542.     property Method: MethodConstants read Get_Method write Set_Method;
  1543.     property URL: WideString read Get_URL write Set_URL;
  1544.     property DocInput: DocInput read Get_DocInput;
  1545.     property DocOutput: DocOutput read Get_DocOutput;
  1546.     property Proxy: IHttpProxy read Get_Proxy;
  1547.   end;
  1548.  
  1549. { DispInterface declaration for Dual Interface IHTTPCT }
  1550.  
  1551.   DHTTPCT = dispinterface
  1552.     ['{B7FC3561-8CE7-11CF-9754-00AA00C00908}']
  1553.     property Document: WideString dispid 10;
  1554.     property Method: MethodConstants dispid 11;
  1555.     property URL: WideString dispid 1001;
  1556.     property DocInput: DocInput readonly dispid 1002;
  1557.     property DocOutput: DocOutput readonly dispid 1003;
  1558.     property Proxy: IHttpProxy readonly dispid 21;
  1559.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  1560.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1561.   end;
  1562.  
  1563. { Event interface for NetManage HTTP Client Control }
  1564.  
  1565.   DHTTPCTEvents = dispinterface
  1566.     ['{B7FC3562-8CE7-11CF-9754-00AA00C00908}']
  1567.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  1568.     procedure Timeout(event: Smallint; var  {IDL_None} Continue: WordBool); dispid 551;
  1569.     procedure Cancel; dispid 552;
  1570.     procedure StateChanged(State: Smallint); dispid 553;
  1571.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  1572.     procedure Busy(isBusy: WordBool); dispid 555;
  1573.     procedure Log; dispid 556;
  1574.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  1575.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1576.   end;
  1577.  
  1578. { Proxy Object }
  1579.  
  1580.   Proxy = IHttpProxy;
  1581.  
  1582.   CoProxy = class
  1583.     class function Create: IHttpProxy;
  1584.     class function CreateRemote(const MachineName: string): IHttpProxy;
  1585.   end;
  1586.  
  1587. { NetManage HTTP Client Control }
  1588.  
  1589.   THTTPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  1590.   THTTPTimeout = procedure(Sender: TObject; event: Smallint; var  {IDL_None} Continue: WordBool) of object;
  1591.   THTTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  1592.   THTTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  1593.   THTTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  1594.   THTTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  1595.   THTTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1596.  
  1597.   THTTP = class(TOleControl)
  1598.   private
  1599.     FOnError: THTTPError;
  1600.     FOnTimeout: THTTPTimeout;
  1601.     FOnCancel: TNotifyEvent;
  1602.     FOnStateChanged: THTTPStateChanged;
  1603.     FOnProtocolStateChanged: THTTPProtocolStateChanged;
  1604.     FOnBusy: THTTPBusy;
  1605.     FOnLog: TNotifyEvent;
  1606.     FOnDocInput: THTTPDocInput;
  1607.     FOnDocOutput: THTTPDocOutput;
  1608.     FIntf: IHTTPCT;
  1609.     function Get_Timeout(event: Smallint): Integer;
  1610.     procedure Set_Timeout(event: Smallint; Value: Integer);
  1611.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  1612.     function Get_Errors: icErrors;
  1613.     function Get_DocInput: DocInput;
  1614.     function Get_DocOutput: DocOutput;
  1615.     function Get_Proxy: IHttpProxy;
  1616.   protected
  1617.     procedure InitControlData; override;
  1618.     procedure InitControlInterface(const Obj: IUnknown); override;
  1619.   public
  1620.     procedure AboutBox;
  1621.     procedure Cancel;
  1622.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  1623.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  1624.     property ControlInterface: IHTTPCT read FIntf;
  1625.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1626.     property State: Smallint index 503 read GetSmallintProp;
  1627.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  1628.     property ReplyString: WideString index 505 read GetWideStringProp;
  1629.     property ReplyCode: Integer index 506 read GetIntegerProp;
  1630.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  1631.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  1632.     property Errors: icErrors read Get_Errors;
  1633.     property Busy: WordBool index 509 read GetWordBoolProp;
  1634.     property StateString: WideString index 511 read GetWideStringProp;
  1635.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  1636.     property SocketHandle: Integer index 518 read GetIntegerProp;
  1637.     property DocInput: DocInput read Get_DocInput;
  1638.     property DocOutput: DocOutput read Get_DocOutput;
  1639.     property Proxy: IHttpProxy read Get_Proxy;
  1640.   published
  1641.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1642.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1643.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  1644.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  1645.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  1646.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  1647.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  1648.     property Document: WideString index 10 read GetWideStringProp write SetWideStringProp stored False;
  1649.     property Method: MethodConstants index 11 read GetTOleEnumProp write SetTOleEnumProp stored False;
  1650.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  1651.     property OnError: THTTPError read FOnError write FOnError;
  1652.     property OnTimeout: THTTPTimeout read FOnTimeout write FOnTimeout;
  1653.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  1654.     property OnStateChanged: THTTPStateChanged read FOnStateChanged write FOnStateChanged;
  1655.     property OnProtocolStateChanged: THTTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  1656.     property OnBusy: THTTPBusy read FOnBusy write FOnBusy;
  1657.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  1658.     property OnDocInput: THTTPDocInput read FOnDocInput write FOnDocInput;
  1659.     property OnDocOutput: THTTPDocOutput read FOnDocOutput write FOnDocOutput;
  1660.   end;
  1661.  
  1662. const
  1663.   LIBID_NNTPCTLib: TGUID = '{B7FC3564-8CE7-11CF-9754-00AA00C00908}';
  1664.  
  1665. { NNTPProtocolStateConstants }
  1666.  
  1667.   nntpBase = 0;
  1668.   nntpTransaction = 1;
  1669.  
  1670. { Component class GUIDs }
  1671.   Class_NNTP: TGUID = '{B7FC3568-8CE7-11CF-9754-00AA00C00908}';
  1672.  
  1673. type
  1674.  
  1675. { Forward declarations }
  1676.   Inntpct = interface;
  1677.   Dnntpct = dispinterface;
  1678.   DnntpctEvents = dispinterface;
  1679.  
  1680.   NNTPProtocolStateConstants = TOleEnum;
  1681.  
  1682. { Properties/Methods for NetManage NNTP Client Control }
  1683.  
  1684.   Inntpct = interface(INMOleClientControl)
  1685.     ['{B7FC3566-8CE7-11CF-9754-00AA00C00908}']
  1686.     function Get_URL: WideString; safecall;
  1687.     procedure Set_URL(const Value: WideString); safecall;
  1688.     function Get_DocInput: DocInput; safecall;
  1689.     function Get_DocOutput: DocOutput; safecall;
  1690.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  1691.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1692.     function Get_ArticleNumbersSupported: WordBool; safecall;
  1693.     function Get_OverviewSupported: WordBool; safecall;
  1694.     function Get_PostingAllowed: WordBool; safecall;
  1695.     function Get_LastUpdate: TDateTime; safecall;
  1696.     procedure Set_LastUpdate(Value: TDateTime); safecall;
  1697.     procedure GetAdministrationFile(LastUpdate: OleVariant); safecall;
  1698.     procedure SelectGroup(const groupName: WideString); safecall;
  1699.     procedure SetNextArticle; safecall;
  1700.     procedure SetLastArticle; safecall;
  1701.     procedure GetArticleNumbers(groupName: OleVariant); safecall;
  1702.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant); safecall;
  1703.     procedure GetArticleByArticleNumber(articleNumber: OleVariant); safecall;
  1704.     procedure GetArticleByMessageID(const messageID: WideString); safecall;
  1705.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant); safecall;
  1706.     procedure GetHeaderByMessageID(const messageID: WideString); safecall;
  1707.     procedure GetBodyByArticleNumber(articleNumber: OleVariant); safecall;
  1708.     procedure GetBodyByMessageID(const messageID: WideString); safecall;
  1709.     procedure GetStatByArticleNumber(articleNumber: OleVariant); safecall;
  1710.     procedure GetOverviewFormat; safecall;
  1711.     procedure GetOverview(firstArticle, lastArticle: OleVariant); safecall;
  1712.     procedure ListGroups; safecall;
  1713.     procedure ListGroupDescriptions; safecall;
  1714.     procedure ListNewGroups(LastUpdate: OleVariant); safecall;
  1715.     procedure Quit; safecall;
  1716.     property URL: WideString read Get_URL write Set_URL;
  1717.     property DocInput: DocInput read Get_DocInput;
  1718.     property DocOutput: DocOutput read Get_DocOutput;
  1719.     property ArticleNumbersSupported: WordBool read Get_ArticleNumbersSupported;
  1720.     property OverviewSupported: WordBool read Get_OverviewSupported;
  1721.     property PostingAllowed: WordBool read Get_PostingAllowed;
  1722.     property LastUpdate: TDateTime read Get_LastUpdate write Set_LastUpdate;
  1723.   end;
  1724.  
  1725. { DispInterface declaration for Dual Interface Inntpct }
  1726.  
  1727.   Dnntpct = dispinterface
  1728.     ['{B7FC3566-8CE7-11CF-9754-00AA00C00908}']
  1729.     property URL: WideString dispid 1001;
  1730.     property DocInput: DocInput readonly dispid 1002;
  1731.     property DocOutput: DocOutput readonly dispid 1003;
  1732.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  1733.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1734.     property ArticleNumbersSupported: WordBool readonly dispid 1;
  1735.     property OverviewSupported: WordBool readonly dispid 2;
  1736.     property PostingAllowed: WordBool readonly dispid 3;
  1737.     property LastUpdate: TDateTime dispid 4;
  1738.     procedure GetAdministrationFile(LastUpdate: OleVariant); dispid 5;
  1739.     procedure SelectGroup(const groupName: WideString); dispid 6;
  1740.     procedure SetNextArticle; dispid 7;
  1741.     procedure SetLastArticle; dispid 8;
  1742.     procedure GetArticleNumbers(groupName: OleVariant); dispid 9;
  1743.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant); dispid 10;
  1744.     procedure GetArticleByArticleNumber(articleNumber: OleVariant); dispid 11;
  1745.     procedure GetArticleByMessageID(const messageID: WideString); dispid 12;
  1746.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant); dispid 13;
  1747.     procedure GetHeaderByMessageID(const messageID: WideString); dispid 14;
  1748.     procedure GetBodyByArticleNumber(articleNumber: OleVariant); dispid 15;
  1749.     procedure GetBodyByMessageID(const messageID: WideString); dispid 16;
  1750.     procedure GetStatByArticleNumber(articleNumber: OleVariant); dispid 17;
  1751.     procedure GetOverviewFormat; dispid 18;
  1752.     procedure GetOverview(firstArticle, lastArticle: OleVariant); dispid 19;
  1753.     procedure ListGroups; dispid 20;
  1754.     procedure ListGroupDescriptions; dispid 21;
  1755.     procedure ListNewGroups(LastUpdate: OleVariant); dispid 22;
  1756.     procedure Quit; dispid 24;
  1757.   end;
  1758.  
  1759. { Event interface for NetManage NNTP Client Control }
  1760.  
  1761.   DnntpctEvents = dispinterface
  1762.     ['{B7FC3567-8CE7-11CF-9754-00AA00C00908}']
  1763.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  1764.     procedure Timeout(event: Smallint; var  {IDL_None} Continue: WordBool); dispid 551;
  1765.     procedure Cancel; dispid 552;
  1766.     procedure StateChanged(State: Smallint); dispid 553;
  1767.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  1768.     procedure Busy(isBusy: WordBool); dispid 555;
  1769.     procedure Log; dispid 556;
  1770.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  1771.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1772.     procedure AuthenticateRequest(var UserId, Password: WideString); dispid 0;
  1773.     procedure AuthenticateResponse(Authenticated: WordBool); dispid 1;
  1774.     procedure Banner(const Banner: WideString); dispid 2;
  1775.     procedure SelectGroup(const groupName: WideString; firstMessage, lastMessage, msgCount: Integer); dispid 3;
  1776.     procedure NextArticle(articleNumber: Integer; const messageID: WideString); dispid 4;
  1777.     procedure lastArticle(articleNumber: Integer; const messageID: WideString); dispid 5;
  1778.     procedure ArticleStatus(articleNumber: Integer; const messageID: WideString); dispid 6;
  1779.   end;
  1780.  
  1781. { NetManage NNTP Client Control }
  1782.  
  1783.   TNNTPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  1784.   TNNTPTimeout = procedure(Sender: TObject; event: Smallint; var  {IDL_None} Continue: WordBool) of object;
  1785.   TNNTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  1786.   TNNTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  1787.   TNNTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  1788.   TNNTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  1789.   TNNTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1790.   TNNTPAuthenticateRequest = procedure(Sender: TObject; var UserId, Password: WideString) of object;
  1791.   TNNTPAuthenticateResponse = procedure(Sender: TObject; Authenticated: WordBool) of object;
  1792.   TNNTPBanner = procedure(Sender: TObject; const Banner: WideString) of object;
  1793.   TNNTPSelectGroup = procedure(Sender: TObject; const groupName: WideString; firstMessage, lastMessage, msgCount: Integer) of object;
  1794.   TNNTPNextArticle = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  1795.   TNNTPlastArticle = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  1796.   TNNTPArticleStatus = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  1797.  
  1798.   TNNTP = class(TOleControl)
  1799.   private
  1800.     FOnError: TNNTPError;
  1801.     FOnTimeout: TNNTPTimeout;
  1802.     FOnCancel: TNotifyEvent;
  1803.     FOnStateChanged: TNNTPStateChanged;
  1804.     FOnProtocolStateChanged: TNNTPProtocolStateChanged;
  1805.     FOnBusy: TNNTPBusy;
  1806.     FOnLog: TNotifyEvent;
  1807.     FOnDocInput: TNNTPDocInput;
  1808.     FOnDocOutput: TNNTPDocOutput;
  1809.     FOnAuthenticateRequest: TNNTPAuthenticateRequest;
  1810.     FOnAuthenticateResponse: TNNTPAuthenticateResponse;
  1811.     FOnBanner: TNNTPBanner;
  1812.     FOnSelectGroup: TNNTPSelectGroup;
  1813.     FOnNextArticle: TNNTPNextArticle;
  1814.     FOnlastArticle: TNNTPlastArticle;
  1815.     FOnArticleStatus: TNNTPArticleStatus;
  1816.     FIntf: Inntpct;
  1817.     function Get_Timeout(event: Smallint): Integer;
  1818.     procedure Set_Timeout(event: Smallint; Value: Integer);
  1819.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  1820.     function Get_Errors: icErrors;
  1821.     function Get_DocInput: DocInput;
  1822.     function Get_DocOutput: DocOutput;
  1823.   protected
  1824.     procedure InitControlData; override;
  1825.     procedure InitControlInterface(const Obj: IUnknown); override;
  1826.   public
  1827.     procedure AboutBox;
  1828.     procedure Cancel;
  1829.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  1830.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  1831.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  1832.     procedure GetAdministrationFile(LastUpdate: OleVariant);
  1833.     procedure SelectGroup(const groupName: WideString);
  1834.     procedure SetNextArticle;
  1835.     procedure SetLastArticle;
  1836.     procedure GetArticleNumbers(groupName: OleVariant);
  1837.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant);
  1838.     procedure GetArticleByArticleNumber(articleNumber: OleVariant);
  1839.     procedure GetArticleByMessageID(const messageID: WideString);
  1840.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant);
  1841.     procedure GetHeaderByMessageID(const messageID: WideString);
  1842.     procedure GetBodyByArticleNumber(articleNumber: OleVariant);
  1843.     procedure GetBodyByMessageID(const messageID: WideString);
  1844.     procedure GetStatByArticleNumber(articleNumber: OleVariant);
  1845.     procedure GetOverviewFormat;
  1846.     procedure GetOverview(firstArticle, lastArticle: OleVariant);
  1847.     procedure ListGroups;
  1848.     procedure ListGroupDescriptions;
  1849.     procedure ListNewGroups(LastUpdate: OleVariant);
  1850.     procedure Quit;
  1851.     property ControlInterface: Inntpct read FIntf;
  1852.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1853.     property State: Smallint index 503 read GetSmallintProp;
  1854.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  1855.     property ReplyString: WideString index 505 read GetWideStringProp;
  1856.     property ReplyCode: Integer index 506 read GetIntegerProp;
  1857.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  1858.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  1859.     property Errors: icErrors read Get_Errors;
  1860.     property Busy: WordBool index 509 read GetWordBoolProp;
  1861.     property StateString: WideString index 511 read GetWideStringProp;
  1862.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  1863.     property SocketHandle: Integer index 518 read GetIntegerProp;
  1864.     property DocInput: DocInput read Get_DocInput;
  1865.     property DocOutput: DocOutput read Get_DocOutput;
  1866.     property ArticleNumbersSupported: WordBool index 1 read GetWordBoolProp;
  1867.     property OverviewSupported: WordBool index 2 read GetWordBoolProp;
  1868.     property PostingAllowed: WordBool index 3 read GetWordBoolProp;
  1869.   published
  1870.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1871.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1872.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  1873.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  1874.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  1875.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  1876.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  1877.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  1878.     property LastUpdate: TDateTime index 4 read GetTDateTimeProp write SetTDateTimeProp stored False;
  1879.     property OnError: TNNTPError read FOnError write FOnError;
  1880.     property OnTimeout: TNNTPTimeout read FOnTimeout write FOnTimeout;
  1881.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  1882.     property OnStateChanged: TNNTPStateChanged read FOnStateChanged write FOnStateChanged;
  1883.     property OnProtocolStateChanged: TNNTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  1884.     property OnBusy: TNNTPBusy read FOnBusy write FOnBusy;
  1885.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  1886.     property OnDocInput: TNNTPDocInput read FOnDocInput write FOnDocInput;
  1887.     property OnDocOutput: TNNTPDocOutput read FOnDocOutput write FOnDocOutput;
  1888.     property OnAuthenticateRequest: TNNTPAuthenticateRequest read FOnAuthenticateRequest write FOnAuthenticateRequest;
  1889.     property OnAuthenticateResponse: TNNTPAuthenticateResponse read FOnAuthenticateResponse write FOnAuthenticateResponse;
  1890.     property OnBanner: TNNTPBanner read FOnBanner write FOnBanner;
  1891.     property OnSelectGroup: TNNTPSelectGroup read FOnSelectGroup write FOnSelectGroup;
  1892.     property OnNextArticle: TNNTPNextArticle read FOnNextArticle write FOnNextArticle;
  1893.     property OnlastArticle: TNNTPlastArticle read FOnlastArticle write FOnlastArticle;
  1894.     property OnArticleStatus: TNNTPArticleStatus read FOnArticleStatus write FOnArticleStatus;
  1895.   end;
  1896.  
  1897. const
  1898.   LIBID_POPCTLib: TGUID = '{B7FC356A-8CE7-11CF-9754-00AA00C00908}';
  1899.  
  1900. const
  1901.  
  1902. { PopProtocolStateConstants }
  1903.  
  1904.   popBase = 0;
  1905.   popAuthorization = 1;
  1906.   popTransaction = 2;
  1907.   popUpdate = 3;
  1908.  
  1909. { Component class GUIDs }
  1910.   Class_POP: TGUID = '{B7FC356E-8CE7-11CF-9754-00AA00C00908}';
  1911.  
  1912. type
  1913.  
  1914. { Forward declarations }
  1915.   Ipopct = interface;
  1916.   Dpopct = dispinterface;
  1917.   DpopctEvents = dispinterface;
  1918.  
  1919.   PopProtocolStateConstants = TOleEnum;
  1920.  
  1921. { Properties/Methods for NetManage POP Client Control }
  1922.  
  1923.   Ipopct = interface(INMOleAuthClientControl)
  1924.     ['{B7FC356C-8CE7-11CF-9754-00AA00C00908}']
  1925.     function Get_URL: WideString; safecall;
  1926.     procedure Set_URL(const Value: WideString); safecall;
  1927.     function Get_DocOutput: DocOutput; safecall;
  1928.     function Get_TopSupported: WordBool; safecall;
  1929.     function Get_TopLines: Integer; safecall;
  1930.     procedure Set_TopLines(Value: Integer); safecall;
  1931.     function Get_MessageCount: Smallint; safecall;
  1932.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1933.     procedure MessageSize(MessageNumber: Smallint); safecall;
  1934.     procedure RetrieveMessage(MessageNumber: Smallint); safecall;
  1935.     procedure Delete(MessageNumber: Smallint); safecall;
  1936.     procedure Reset; safecall;
  1937.     procedure Last; safecall;
  1938.     procedure Noop; safecall;
  1939.     procedure TopMessage(MessageNumber: Smallint); safecall;
  1940.     procedure Quit; safecall;
  1941.     procedure RefreshMessageCount; safecall;
  1942.     property URL: WideString read Get_URL write Set_URL;
  1943.     property DocOutput: DocOutput read Get_DocOutput;
  1944.     property TopSupported: WordBool read Get_TopSupported;
  1945.     property TopLines: Integer read Get_TopLines write Set_TopLines;
  1946.     property MessageCount: Smallint read Get_MessageCount;
  1947.   end;
  1948.  
  1949. { DispInterface declaration for Dual Interface Ipopct }
  1950.  
  1951.   Dpopct = dispinterface
  1952.     ['{B7FC356C-8CE7-11CF-9754-00AA00C00908}']
  1953.     property URL: WideString dispid 1001;
  1954.     property DocOutput: DocOutput readonly dispid 1003;
  1955.     property TopSupported: WordBool readonly dispid 2452;
  1956.     property TopLines: Integer dispid 2453;
  1957.     property MessageCount: Smallint readonly dispid 2454;
  1958.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1959.     procedure MessageSize(MessageNumber: Smallint); dispid 2456;
  1960.     procedure RetrieveMessage(MessageNumber: Smallint); dispid 2457;
  1961.     procedure Delete(MessageNumber: Smallint); dispid 2458;
  1962.     procedure Reset; dispid 2459;
  1963.     procedure Last; dispid 2460;
  1964.     procedure Noop; dispid 2455;
  1965.     procedure TopMessage(MessageNumber: Smallint); dispid 2461;
  1966.     procedure Quit; dispid 2462;
  1967.     procedure RefreshMessageCount; dispid 2500;
  1968.   end;
  1969.  
  1970. { Event interface for NetManage POP Client Control }
  1971.  
  1972.   DpopctEvents = dispinterface
  1973.     ['{B7FC356D-8CE7-11CF-9754-00AA00C00908}']
  1974.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  1975.     procedure Timeout(event: Smallint; var  {IDL_None} Continue: WordBool); dispid 551;
  1976.     procedure Cancel; dispid 552;
  1977.     procedure StateChanged(State: Smallint); dispid 553;
  1978.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  1979.     procedure Busy(isBusy: WordBool); dispid 555;
  1980.     procedure Log; dispid 556;
  1981.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1982.     procedure MessageSize(msgSize: Integer); dispid 2465;
  1983.     procedure Delete; dispid 2466;
  1984.     procedure Reset; dispid 2467;
  1985.     procedure Last(Number: Integer); dispid 2468;
  1986.     procedure Noop; dispid 2470;
  1987.     procedure RefreshMessageCount(Number: Integer); dispid 2471;
  1988.   end;
  1989.  
  1990. { NetManage POP Client Control }
  1991.  
  1992.   TPOPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  1993.   TPOPTimeout = procedure(Sender: TObject; event: Smallint; var  {IDL_None} Continue: WordBool) of object;
  1994.   TPOPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  1995.   TPOPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  1996.   TPOPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  1997.   TPOPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1998.   TPOPMessageSize = procedure(Sender: TObject; msgSize: Integer) of object;
  1999.   TPOPLast = procedure(Sender: TObject; Number: Integer) of object;
  2000.   TPOPRefreshMessageCount = procedure(Sender: TObject; Number: Integer) of object;
  2001.  
  2002.   TPOP = class(TOleControl)
  2003.   private
  2004.     FOnError: TPOPError;
  2005.     FOnTimeout: TPOPTimeout;
  2006.     FOnCancel: TNotifyEvent;
  2007.     FOnStateChanged: TPOPStateChanged;
  2008.     FOnProtocolStateChanged: TPOPProtocolStateChanged;
  2009.     FOnBusy: TPOPBusy;
  2010.     FOnLog: TNotifyEvent;
  2011.     FOnDocOutput: TPOPDocOutput;
  2012.     FOnMessageSize: TPOPMessageSize;
  2013.     FOnDelete: TNotifyEvent;
  2014.     FOnReset: TNotifyEvent;
  2015.     FOnLast: TPOPLast;
  2016.     FOnNoop: TNotifyEvent;
  2017.     FOnRefreshMessageCount: TPOPRefreshMessageCount;
  2018.     FIntf: Ipopct;
  2019.     function Get_Timeout(event: Smallint): Integer;
  2020.     procedure Set_Timeout(event: Smallint; Value: Integer);
  2021.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  2022.     function Get_Errors: icErrors;
  2023.     function Get_DocOutput: DocOutput;
  2024.   protected
  2025.     procedure InitControlData; override;
  2026.     procedure InitControlInterface(const Obj: IUnknown); override;
  2027.   public
  2028.     procedure AboutBox;
  2029.     procedure Cancel;
  2030.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2031.     procedure Authenticate(UserId, Password: OleVariant);
  2032.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  2033.     procedure MessageSize(MessageNumber: Smallint);
  2034.     procedure RetrieveMessage(MessageNumber: Smallint);
  2035.     procedure Delete(MessageNumber: Smallint);
  2036.     procedure Reset;
  2037.     procedure Last;
  2038.     procedure Noop;
  2039.     procedure TopMessage(MessageNumber: Smallint);
  2040.     procedure Quit;
  2041.     procedure RefreshMessageCount;
  2042.     property ControlInterface: Ipopct read FIntf;
  2043.     property BlockResult: Smallint index 519 read GetSmallintProp;
  2044.     property State: Smallint index 503 read GetSmallintProp;
  2045.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  2046.     property ReplyString: WideString index 505 read GetWideStringProp;
  2047.     property ReplyCode: Integer index 506 read GetIntegerProp;
  2048.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  2049.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  2050.     property Errors: icErrors read Get_Errors;
  2051.     property Busy: WordBool index 509 read GetWordBoolProp;
  2052.     property StateString: WideString index 511 read GetWideStringProp;
  2053.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  2054.     property SocketHandle: Integer index 518 read GetIntegerProp;
  2055.     property DocOutput: DocOutput read Get_DocOutput;
  2056.     property TopSupported: WordBool index 2452 read GetWordBoolProp;
  2057.     property MessageCount: Smallint index 2454 read GetSmallintProp;
  2058.   published
  2059.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  2060.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  2061.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2062.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2063.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  2064.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  2065.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  2066.     property UserId: WideString index 601 read GetWideStringProp write SetWideStringProp stored False;
  2067.     property Password: WideString index 602 read GetWideStringProp write SetWideStringProp stored False;
  2068.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  2069.     property TopLines: Integer index 2453 read GetIntegerProp write SetIntegerProp stored False;
  2070.     property OnError: TPOPError read FOnError write FOnError;
  2071.     property OnTimeout: TPOPTimeout read FOnTimeout write FOnTimeout;
  2072.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  2073.     property OnStateChanged: TPOPStateChanged read FOnStateChanged write FOnStateChanged;
  2074.     property OnProtocolStateChanged: TPOPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  2075.     property OnBusy: TPOPBusy read FOnBusy write FOnBusy;
  2076.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  2077.     property OnDocOutput: TPOPDocOutput read FOnDocOutput write FOnDocOutput;
  2078.     property OnMessageSize: TPOPMessageSize read FOnMessageSize write FOnMessageSize;
  2079.     property OnDelete: TNotifyEvent read FOnDelete write FOnDelete;
  2080.     property OnReset: TNotifyEvent read FOnReset write FOnReset;
  2081.     property OnLast: TPOPLast read FOnLast write FOnLast;
  2082.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  2083.     property OnRefreshMessageCount: TPOPRefreshMessageCount read FOnRefreshMessageCount write FOnRefreshMessageCount;
  2084.   end;
  2085.  
  2086. const
  2087.   LIBID_SMTPCTLib: TGUID = '{B7FC3570-8CE7-11CF-9754-00AA00C00908}';
  2088.  
  2089. { SMTPProtocolStateConstants }
  2090.  
  2091.   smtpBase = 0;
  2092.   smtpTransaction = 1;
  2093.  
  2094. { Component class GUIDs }
  2095.   Class_SMTP: TGUID = '{B7FC3573-8CE7-11CF-9754-00AA00C00908}';
  2096.  
  2097. type
  2098.  
  2099. { Forward declarations }
  2100.   Ismtpct = interface;
  2101.   Dsmtpct = dispinterface;
  2102.   DsmtpctEvents = dispinterface;
  2103.  
  2104.   SMTPProtocolStateConstants = TOleEnum;
  2105.  
  2106. { Properties/Methods for NetManage SMTP Client Control }
  2107.  
  2108.   Ismtpct = interface(INMOleClientControl)
  2109.     ['{B7FC3571-8CE7-11CF-9754-00AA00C00908}']
  2110.     function Get_URL: WideString; safecall;
  2111.     procedure Set_URL(const Value: WideString); safecall;
  2112.     function Get_DocInput: DocInput; safecall;
  2113.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  2114.     procedure Reset; safecall;
  2115.     procedure Verify(const name: WideString); safecall;
  2116.     procedure Expand(const name: WideString); safecall;
  2117.     procedure Help(helpTopic: OleVariant); safecall;
  2118.     procedure Noop; safecall;
  2119.     procedure Quit; safecall;
  2120.     property URL: WideString read Get_URL write Set_URL;
  2121.     property DocInput: DocInput read Get_DocInput;
  2122.   end;
  2123.  
  2124. { DispInterface declaration for Dual Interface Ismtpct }
  2125.  
  2126.   Dsmtpct = dispinterface
  2127.     ['{B7FC3571-8CE7-11CF-9754-00AA00C00908}']
  2128.     property URL: WideString dispid 1001;
  2129.     property DocInput: DocInput readonly dispid 1002;
  2130.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  2131.     procedure Reset; dispid 200;
  2132.     procedure Verify(const name: WideString); dispid 201;
  2133.     procedure Expand(const name: WideString); dispid 202;
  2134.     procedure Help(helpTopic: OleVariant); dispid 203;
  2135.     procedure Noop; dispid 204;
  2136.     procedure Quit; dispid 205;
  2137.   end;
  2138.  
  2139. { Event interface for NetManage SMTP Client Control }
  2140.  
  2141.   DsmtpctEvents = dispinterface
  2142.     ['{B7FC3572-8CE7-11CF-9754-00AA00C00908}']
  2143.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  2144.     procedure Timeout(event: Smallint; var  {IDL_None} Continue: WordBool); dispid 551;
  2145.     procedure Cancel; dispid 552;
  2146.     procedure StateChanged(State: Smallint); dispid 553;
  2147.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  2148.     procedure Busy(isBusy: WordBool); dispid 555;
  2149.     procedure Log; dispid 556;
  2150.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  2151.     procedure Reset; dispid 300;
  2152.     procedure Verify; dispid 301;
  2153.     procedure Expand; dispid 302;
  2154.     procedure Help; dispid 303;
  2155.     procedure Noop; dispid 304;
  2156.   end;
  2157.  
  2158. { NetManage SMTP Client Control }
  2159.  
  2160.   TSMTPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  2161.   TSMTPTimeout = procedure(Sender: TObject; event: Smallint; var  {IDL_None} Continue: WordBool) of object;
  2162.   TSMTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  2163.   TSMTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  2164.   TSMTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  2165.   TSMTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  2166.  
  2167.   TSMTP = class(TOleControl)
  2168.   private
  2169.     FOnError: TSMTPError;
  2170.     FOnTimeout: TSMTPTimeout;
  2171.     FOnCancel: TNotifyEvent;
  2172.     FOnStateChanged: TSMTPStateChanged;
  2173.     FOnProtocolStateChanged: TSMTPProtocolStateChanged;
  2174.     FOnBusy: TSMTPBusy;
  2175.     FOnLog: TNotifyEvent;
  2176.     FOnDocInput: TSMTPDocInput;
  2177.     FOnReset: TNotifyEvent;
  2178.     FOnVerify: TNotifyEvent;
  2179.     FOnExpand: TNotifyEvent;
  2180.     FOnHelp: TNotifyEvent;
  2181.     FOnNoop: TNotifyEvent;
  2182.     FIntf: Ismtpct;
  2183.     function Get_Timeout(event: Smallint): Integer;
  2184.     procedure Set_Timeout(event: Smallint; Value: Integer);
  2185.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  2186.     function Get_Errors: icErrors;
  2187.     function Get_DocInput: DocInput;
  2188.   protected
  2189.     procedure InitControlData; override;
  2190.     procedure InitControlInterface(const Obj: IUnknown); override;
  2191.   public
  2192.     procedure AboutBox;
  2193.     procedure Cancel;
  2194.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2195.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2196.     procedure Reset;
  2197.     procedure Verify(const name: WideString);
  2198.     procedure Expand(const name: WideString);
  2199.     procedure Help(helpTopic: OleVariant);
  2200.     procedure Noop;
  2201.     procedure Quit;
  2202.     property ControlInterface: Ismtpct read FIntf;
  2203.     property BlockResult: Smallint index 519 read GetSmallintProp;
  2204.     property State: Smallint index 503 read GetSmallintProp;
  2205.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  2206.     property ReplyString: WideString index 505 read GetWideStringProp;
  2207.     property ReplyCode: Integer index 506 read GetIntegerProp;
  2208.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  2209.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  2210.     property Errors: icErrors read Get_Errors;
  2211.     property Busy: WordBool index 509 read GetWordBoolProp;
  2212.     property StateString: WideString index 511 read GetWideStringProp;
  2213.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  2214.     property SocketHandle: Integer index 518 read GetIntegerProp;
  2215.     property DocInput: DocInput read Get_DocInput;
  2216.   published
  2217.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  2218.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  2219.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2220.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2221.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  2222.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  2223.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  2224.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  2225.     property OnError: TSMTPError read FOnError write FOnError;
  2226.     property OnTimeout: TSMTPTimeout read FOnTimeout write FOnTimeout;
  2227.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  2228.     property OnStateChanged: TSMTPStateChanged read FOnStateChanged write FOnStateChanged;
  2229.     property OnProtocolStateChanged: TSMTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  2230.     property OnBusy: TSMTPBusy read FOnBusy write FOnBusy;
  2231.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  2232.     property OnDocInput: TSMTPDocInput read FOnDocInput write FOnDocInput;
  2233.     property OnReset: TNotifyEvent read FOnReset write FOnReset;
  2234.     property OnVerify: TNotifyEvent read FOnVerify write FOnVerify;
  2235.     property OnExpand: TNotifyEvent read FOnExpand write FOnExpand;
  2236.     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
  2237.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  2238.   end;
  2239.  
  2240. const
  2241.   LIBID_WINSOCKLib: TGUID = '{B7FC3580-8CE7-11CF-9754-00AA00C00908}';
  2242.  
  2243. { SCKSTATEConstants }
  2244.  
  2245.   sckClosed = 0;
  2246.   sckOpen = 1;
  2247.   sckListening = 2;
  2248.   sckConnectionPending = 3;
  2249.   sckResolvingHost = 4;
  2250.   sckHostResolved = 5;
  2251.   sckConnecting = 6;
  2252.   sckConnected = 7;
  2253.   sckClosing = 8;
  2254.   sckError = 9;
  2255.  
  2256. const
  2257.  
  2258. { Component class GUIDs }
  2259.   Class_TCP: TGUID = '{B7FC3584-8CE7-11CF-9754-00AA00C00908}';
  2260.   Class_UDP: TGUID = '{B7FC3587-8CE7-11CF-9754-00AA00C00908}';
  2261.  
  2262. type
  2263.  
  2264. { Forward declarations }
  2265.   INMWinsockControl = interface;
  2266.   DNMWinsockControl = dispinterface;
  2267.   DNMWinsockControlEvents = dispinterface;
  2268.   ITCP = interface;
  2269.   DTCP = dispinterface;
  2270.   DTCPEvents = dispinterface;
  2271.   IUDP = interface;
  2272.   DUDP = dispinterface;
  2273.   DUDPEvents = dispinterface;
  2274.  
  2275.   SCKSTATEConstants = TOleEnum;
  2276.  
  2277. { NetManage Shared Winsock methods and events }
  2278.  
  2279.   INMWinsockControl = interface(IDispatch)
  2280.     ['{B7FC3574-8CE7-11CF-9754-00AA00C00908}']
  2281.     procedure AboutBox; safecall;
  2282.     function Get_RemoteHostIP: WideString; safecall;
  2283.     function Get_LocalHostName: WideString; safecall;
  2284.     function Get_LocalIP: WideString; safecall;
  2285.     function Get_SocketHandle: Integer; safecall;
  2286.     property RemoteHostIP: WideString read Get_RemoteHostIP;
  2287.     property LocalHostName: WideString read Get_LocalHostName;
  2288.     property LocalIP: WideString read Get_LocalIP;
  2289.     property SocketHandle: Integer read Get_SocketHandle;
  2290.   end;
  2291.  
  2292. { DispInterface declaration for Dual Interface INMWinsockControl }
  2293.  
  2294.   DNMWinsockControl = dispinterface
  2295.     ['{B7FC3574-8CE7-11CF-9754-00AA00C00908}']
  2296.     procedure AboutBox; dispid -552;
  2297.     property RemoteHostIP: WideString readonly dispid 1001;
  2298.     property LocalHostName: WideString readonly dispid 1002;
  2299.     property LocalIP: WideString readonly dispid 1003;
  2300.     property SocketHandle: Integer readonly dispid 1004;
  2301.   end;
  2302.  
  2303. { Shared Winsock events }
  2304.  
  2305.   DNMWinsockControlEvents = dispinterface
  2306.     ['{B7FC3575-8CE7-11CF-9754-00AA00C00908}']
  2307.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2308.   end;
  2309.  
  2310. { Properties and methods for NetManage TCP Control }
  2311.  
  2312.   ITCP = interface(INMWinsockControl)
  2313.     ['{B7FC3582-8CE7-11CF-9754-00AA00C00908}']
  2314.     function Get_RemoteHost: WideString; safecall;
  2315.     procedure Set_RemoteHost(const Value: WideString); safecall;
  2316.     function Get_RemotePort: Integer; safecall;
  2317.     procedure Set_RemotePort(Value: Integer); safecall;
  2318.     function Get_LocalPort: Integer; safecall;
  2319.     procedure Set_LocalPort(Value: Integer); safecall;
  2320.     function Get_State: Smallint; safecall;
  2321.     function Get_BytesReceived: Integer; safecall;
  2322.     procedure Connect(RemoteHost, RemotePort: OleVariant); safecall;
  2323.     procedure Listen; safecall;
  2324.     procedure Accept(requestID: Integer); safecall;
  2325.     procedure SendData(data: OleVariant); safecall;
  2326.     procedure GetData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant); safecall;
  2327.     procedure PeekData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant); safecall;
  2328.     procedure Close; safecall;
  2329.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  2330.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  2331.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  2332.     property State: Smallint read Get_State;
  2333.     property BytesReceived: Integer read Get_BytesReceived;
  2334.   end;
  2335.  
  2336. { DispInterface declaration for Dual Interface ITCP }
  2337.  
  2338.   DTCP = dispinterface
  2339.     ['{B7FC3582-8CE7-11CF-9754-00AA00C00908}']
  2340.     property RemoteHost: WideString dispid 0;
  2341.     property RemotePort: Integer dispid 502;
  2342.     property LocalPort: Integer dispid 1010;
  2343.     property State: Smallint readonly dispid 503;
  2344.     property BytesReceived: Integer readonly dispid 1101;
  2345.     procedure Connect(RemoteHost, RemotePort: OleVariant); dispid 521;
  2346.     procedure Listen; dispid 1102;
  2347.     procedure Accept(requestID: Integer); dispid 1103;
  2348.     procedure SendData(data: OleVariant); dispid 1012;
  2349.     procedure GetData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant); dispid 1011;
  2350.     procedure PeekData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant); dispid 1104;
  2351.     procedure Close; dispid 1105;
  2352.   end;
  2353.  
  2354. { NetManage TCP Control events }
  2355.  
  2356.   DTCPEvents = dispinterface
  2357.     ['{B7FC3583-8CE7-11CF-9754-00AA00C00908}']
  2358.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  2359.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2360.     procedure Connect; dispid 1151;
  2361.     procedure ConnectionRequest(requestID: Integer); dispid 1152;
  2362.     procedure Close; dispid 1155;
  2363.     procedure SendProgress(bytesSent, bytesRemaining: Integer); dispid 1153;
  2364.     procedure SendComplete; dispid 1154;
  2365.   end;
  2366.  
  2367. { Properties and methods for the NetManage UDP Control }
  2368.  
  2369.   IUDP = interface(INMWinsockControl)
  2370.     ['{B7FC3585-8CE7-11CF-9754-00AA00C00908}']
  2371.     function Get_RemoteHost: WideString; safecall;
  2372.     procedure Set_RemoteHost(const Value: WideString); safecall;
  2373.     function Get_RemotePort: Integer; safecall;
  2374.     procedure Set_RemotePort(Value: Integer); safecall;
  2375.     function Get_LocalPort: Integer; safecall;
  2376.     procedure Set_LocalPort(Value: Integer); safecall;
  2377.     procedure SendData(data: OleVariant); safecall;
  2378.     procedure GetData(var  {IDL_In} data: OleVariant; type_: OleVariant); safecall;
  2379.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  2380.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  2381.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  2382.   end;
  2383.  
  2384. { DispInterface declaration for Dual Interface IUDP }
  2385.  
  2386.   DUDP = dispinterface
  2387.     ['{B7FC3585-8CE7-11CF-9754-00AA00C00908}']
  2388.     property RemoteHost: WideString dispid 0;
  2389.     property RemotePort: Integer dispid 502;
  2390.     property LocalPort: Integer dispid 1010;
  2391.     procedure SendData(data: OleVariant); dispid 1012;
  2392.     procedure GetData(var  {IDL_In} data: OleVariant; type_: OleVariant); dispid 1011;
  2393.   end;
  2394.  
  2395. { NetManage UDP Control events }
  2396.  
  2397.   DUDPEvents = dispinterface
  2398.     ['{B7FC3586-8CE7-11CF-9754-00AA00C00908}']
  2399.     procedure Error(Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool); dispid -608;
  2400.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2401.   end;
  2402.  
  2403. { NetManage TCP Control }
  2404.  
  2405.   TTCPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  2406.   TTCPDataArrival = procedure(Sender: TObject; bytesTotal: Integer) of object;
  2407.   TTCPConnectionRequest = procedure(Sender: TObject; requestID: Integer) of object;
  2408.   TTCPSendProgress = procedure(Sender: TObject; bytesSent, bytesRemaining: Integer) of object;
  2409.  
  2410.   TTCP = class(TOleControl)
  2411.   private
  2412.     FOnError: TTCPError;
  2413.     FOnDataArrival: TTCPDataArrival;
  2414.     FOnConnect: TNotifyEvent;
  2415.     FOnConnectionRequest: TTCPConnectionRequest;
  2416.     FOnClose: TNotifyEvent;
  2417.     FOnSendProgress: TTCPSendProgress;
  2418.     FOnSendComplete: TNotifyEvent;
  2419.     FIntf: ITCP;
  2420.   protected
  2421.     procedure InitControlData; override;
  2422.     procedure InitControlInterface(const Obj: IUnknown); override;
  2423.   public
  2424.     procedure AboutBox;
  2425.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2426.     procedure Listen;
  2427.     procedure Accept(requestID: Integer);
  2428.     procedure SendData(data: OleVariant);
  2429.     procedure GetData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant);
  2430.     procedure PeekData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant);
  2431.     procedure Close;
  2432.     property ControlInterface: ITCP read FIntf;
  2433.     property RemoteHostIP: WideString index 1001 read GetWideStringProp;
  2434.     property LocalHostName: WideString index 1002 read GetWideStringProp;
  2435.     property LocalIP: WideString index 1003 read GetWideStringProp;
  2436.     property SocketHandle: Integer index 1004 read GetIntegerProp;
  2437.     property State: Smallint index 503 read GetSmallintProp;
  2438.     property BytesReceived: Integer index 1101 read GetIntegerProp;
  2439.   published
  2440.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2441.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2442.     property LocalPort: Integer index 1010 read GetIntegerProp write SetIntegerProp stored False;
  2443.     property OnError: TTCPError read FOnError write FOnError;
  2444.     property OnDataArrival: TTCPDataArrival read FOnDataArrival write FOnDataArrival;
  2445.     property OnConnect: TNotifyEvent read FOnConnect write FOnConnect;
  2446.     property OnConnectionRequest: TTCPConnectionRequest read FOnConnectionRequest write FOnConnectionRequest;
  2447.     property OnClose: TNotifyEvent read FOnClose write FOnClose;
  2448.     property OnSendProgress: TTCPSendProgress read FOnSendProgress write FOnSendProgress;
  2449.     property OnSendComplete: TNotifyEvent read FOnSendComplete write FOnSendComplete;
  2450.   end;
  2451.  
  2452. { NetManage UDP Control }
  2453.  
  2454.   TUDPError = procedure(Sender: TObject; Number: Smallint; var  {IDL_None} Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var  {IDL_None} CancelDisplay: WordBool) of object;
  2455.   TUDPDataArrival = procedure(Sender: TObject; bytesTotal: Integer) of object;
  2456.  
  2457.   TUDP = class(TOleControl)
  2458.   private
  2459.     FOnError: TUDPError;
  2460.     FOnDataArrival: TUDPDataArrival;
  2461.     FIntf: IUDP;
  2462.   protected
  2463.     procedure InitControlData; override;
  2464.     procedure InitControlInterface(const Obj: IUnknown); override;
  2465.   public
  2466.     procedure AboutBox;
  2467.     procedure SendData(data: OleVariant);
  2468.     procedure GetData(var  {IDL_In} data: OleVariant; type_: OleVariant);
  2469.     property ControlInterface: IUDP read FIntf;
  2470.     property RemoteHostIP: WideString index 1001 read GetWideStringProp;
  2471.     property LocalHostName: WideString index 1002 read GetWideStringProp;
  2472.     property LocalIP: WideString index 1003 read GetWideStringProp;
  2473.     property SocketHandle: Integer index 1004 read GetIntegerProp;
  2474.   published
  2475.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2476.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2477.     property LocalPort: Integer index 1010 read GetIntegerProp write SetIntegerProp stored False;
  2478.     property OnError: TUDPError read FOnError write FOnError;
  2479.     property OnDataArrival: TUDPDataArrival read FOnDataArrival write FOnDataArrival;
  2480.   end;
  2481.  
  2482. procedure Register;
  2483.  
  2484. implementation
  2485.  
  2486. uses ComObj;
  2487.  
  2488. class function CoDocHeaderCls.Create: DocHeader;
  2489. begin
  2490.   Result := CreateComObject(Class_DocHeaderCls) as DocHeader;
  2491. end;
  2492.  
  2493. class function CoDocHeaderCls.CreateRemote(const MachineName: string): DocHeader;
  2494. begin
  2495.   Result := CreateRemoteComObject(MachineName, Class_DocHeaderCls) as DocHeader;
  2496. end;
  2497.  
  2498. class function CoDocHeadersCls.Create: DocHeaders;
  2499. begin
  2500.   Result := CreateComObject(Class_DocHeadersCls) as DocHeaders;
  2501. end;
  2502.  
  2503. class function CoDocHeadersCls.CreateRemote(const MachineName: string): DocHeaders;
  2504. begin
  2505.   Result := CreateRemoteComObject(MachineName, Class_DocHeadersCls) as DocHeaders;
  2506. end;
  2507.  
  2508. class function CoDocInputCls.Create: DocInput;
  2509. begin
  2510.   Result := CreateComObject(Class_DocInputCls) as DocInput;
  2511. end;
  2512.  
  2513. class function CoDocInputCls.CreateRemote(const MachineName: string): DocInput;
  2514. begin
  2515.   Result := CreateRemoteComObject(MachineName, Class_DocInputCls) as DocInput;
  2516. end;
  2517.  
  2518. class function CoDocOutputCls.Create: DocOutput;
  2519. begin
  2520.   Result := CreateComObject(Class_DocOutputCls) as DocOutput;
  2521. end;
  2522.  
  2523. class function CoDocOutputCls.CreateRemote(const MachineName: string): DocOutput;
  2524. begin
  2525.   Result := CreateRemoteComObject(MachineName, Class_DocOutputCls) as DocOutput;
  2526. end;
  2527.  
  2528. class function CoicErrorCls.Create: icError;
  2529. begin
  2530.   Result := CreateComObject(Class_icErrorCls) as icError;
  2531. end;
  2532.  
  2533. class function CoicErrorCls.CreateRemote(const MachineName: string): icError;
  2534. begin
  2535.   Result := CreateRemoteComObject(MachineName, Class_icErrorCls) as icError;
  2536. end;
  2537.  
  2538. class function CoicErrorsCls.Create: icErrors;
  2539. begin
  2540.   Result := CreateComObject(Class_icErrorsCls) as icErrors;
  2541. end;
  2542.  
  2543. class function CoicErrorsCls.CreateRemote(const MachineName: string): icErrors;
  2544. begin
  2545.   Result := CreateRemoteComObject(MachineName, Class_icErrorsCls) as icErrors;
  2546. end;
  2547.  
  2548. class function CoFTPDirItemCls.Create: FTPDirItem;
  2549. begin
  2550.   Result := CreateComObject(Class_FTPDirItemCls) as FTPDirItem;
  2551. end;
  2552.  
  2553. class function CoFTPDirItemCls.CreateRemote(const MachineName: string): FTPDirItem;
  2554. begin
  2555.   Result := CreateRemoteComObject(MachineName, Class_FTPDirItemCls) as FTPDirItem;
  2556. end;
  2557.  
  2558. class function CoFirewall.Create: IFirewall;
  2559. begin
  2560.   Result := CreateComObject(Class_Firewall) as IFirewall;
  2561. end;
  2562.  
  2563. class function CoFirewall.CreateRemote(const MachineName: string): IFirewall;
  2564. begin
  2565.   Result := CreateRemoteComObject(MachineName, Class_Firewall) as IFirewall;
  2566. end;
  2567.  
  2568. procedure TFTP.InitControlData;
  2569. const
  2570.   CEventDispIDs: array[0..27] of Integer = (
  2571.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  2572.     $0000022C, $000003F8, $000003F9, $0000002B, $0000002C, $0000002D,
  2573.     $0000002F, $00000030, $00000031, $00000036, $00000037, $00000038,
  2574.     $00000039, $0000003A, $0000003C, $0000003E, $0000003F, $00000040,
  2575.     $00000042, $00000044, $00000043, $0000005A);
  2576.   CLicenseKey: array[0..36] of Word = (
  2577.     $0037, $0033, $0066, $0036, $0061, $0062, $0033, $0030, $002D, $0035,
  2578.     $0035, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0038,
  2579.     $0033, $0038, $0039, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  2580.     $0036, $0039, $0037, $0030, $0031, $0034, $0000);
  2581.   CControlData: TControlData = (
  2582.     ClassID: '{B7FC354C-8CE7-11CF-9754-00AA00C00908}';
  2583.     EventIID: '{B7FC354B-8CE7-11CF-9754-00AA00C00908}';
  2584.     EventCount: 28;
  2585.     EventDispIDs: @CEventDispIDs;
  2586.     LicenseKey: @CLicenseKey;
  2587.     Flags: $00000000;
  2588.     Version: 300;
  2589.     FontCount: 0;
  2590.     FontIDs: nil);
  2591. begin
  2592.   ControlData := @CControlData;
  2593. end;
  2594.  
  2595. procedure TFTP.InitControlInterface(const Obj: IUnknown);
  2596. begin
  2597.   FIntf := Obj as Iftpct;
  2598. end;
  2599.  
  2600. procedure TFTP.AboutBox;
  2601. begin
  2602.   ControlInterface.AboutBox;
  2603. end;
  2604.  
  2605. procedure TFTP.Cancel;
  2606. begin
  2607.   ControlInterface.Cancel;
  2608. end;
  2609.  
  2610. procedure TFTP.Connect(RemoteHost, RemotePort: OleVariant);
  2611. begin
  2612.   ControlInterface.Connect(RemoteHost, RemotePort);
  2613. end;
  2614.  
  2615. procedure TFTP.Authenticate(UserId, Password: OleVariant);
  2616. begin
  2617.   ControlInterface.Authenticate(UserId, Password);
  2618. end;
  2619.  
  2620. procedure TFTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2621. begin
  2622.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  2623. end;
  2624.  
  2625. procedure TFTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  2626. begin
  2627.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  2628. end;
  2629.  
  2630. procedure TFTP.Abort;
  2631. begin
  2632.   ControlInterface.Abort;
  2633. end;
  2634.  
  2635. procedure TFTP.Account(const Account: WideString);
  2636. begin
  2637.   ControlInterface.Account(Account);
  2638. end;
  2639.  
  2640. procedure TFTP.ChangeDir(const directory: WideString);
  2641. begin
  2642.   ControlInterface.ChangeDir(directory);
  2643. end;
  2644.  
  2645. procedure TFTP.CreateDir(const directory: WideString);
  2646. begin
  2647.   ControlInterface.CreateDir(directory);
  2648. end;
  2649.  
  2650. procedure TFTP.DeleteDir(const directory: WideString);
  2651. begin
  2652.   ControlInterface.DeleteDir(directory);
  2653. end;
  2654.  
  2655. procedure TFTP.DeleteFile(const FileName: WideString);
  2656. begin
  2657.   ControlInterface.DeleteFile(FileName);
  2658. end;
  2659.  
  2660. procedure TFTP.Quit;
  2661. begin
  2662.   ControlInterface.Quit;
  2663. end;
  2664.  
  2665. procedure TFTP.Help(const Help: WideString);
  2666. begin
  2667.   ControlInterface.Help(Help);
  2668. end;
  2669.  
  2670. procedure TFTP.Noop;
  2671. begin
  2672.   ControlInterface.Noop;
  2673. end;
  2674.  
  2675. procedure TFTP.Mode(ftpMode: FTPModeConstants);
  2676. begin
  2677.   ControlInterface.Mode(ftpMode);
  2678. end;
  2679.  
  2680. procedure TFTP.Type_(ftpType: FTPTypeConstants);
  2681. begin
  2682.   ControlInterface.Type_(ftpType);
  2683. end;
  2684.  
  2685. procedure TFTP.List(const List: WideString);
  2686. begin
  2687.   ControlInterface.List(List);
  2688. end;
  2689.  
  2690. procedure TFTP.NameList(const NameList: WideString);
  2691. begin
  2692.   ControlInterface.NameList(NameList);
  2693. end;
  2694.  
  2695. procedure TFTP.ParentDir;
  2696. begin
  2697.   ControlInterface.ParentDir;
  2698. end;
  2699.  
  2700. procedure TFTP.PrintDir;
  2701. begin
  2702.   ControlInterface.PrintDir;
  2703. end;
  2704.  
  2705. procedure TFTP.Execute(const Execute: WideString);
  2706. begin
  2707.   ControlInterface.Execute(Execute);
  2708. end;
  2709.  
  2710. procedure TFTP.Status(const Status: WideString);
  2711. begin
  2712.   ControlInterface.Status(Status);
  2713. end;
  2714.  
  2715. procedure TFTP.PutFile(const srcFileName, destFileName: WideString);
  2716. begin
  2717.   ControlInterface.PutFile(srcFileName, destFileName);
  2718. end;
  2719.  
  2720. procedure TFTP.Reinitialize;
  2721. begin
  2722.   ControlInterface.Reinitialize;
  2723. end;
  2724.  
  2725. procedure TFTP.System;
  2726. begin
  2727.   ControlInterface.System;
  2728. end;
  2729.  
  2730. procedure TFTP.GetFile(const srcFileName, destFileName: WideString);
  2731. begin
  2732.   ControlInterface.GetFile(srcFileName, destFileName);
  2733. end;
  2734.  
  2735. procedure TFTP.PutFileUnique(const FileName: WideString);
  2736. begin
  2737.   ControlInterface.PutFileUnique(FileName);
  2738. end;
  2739.  
  2740. procedure TFTP.Site(const Site: WideString);
  2741. begin
  2742.   ControlInterface.Site(Site);
  2743. end;
  2744.  
  2745. function TFTP.Get_Timeout(event: Smallint): Integer;
  2746. begin
  2747.   Result := ControlInterface.Timeout[event];
  2748. end;
  2749.  
  2750. procedure TFTP.Set_Timeout(event: Smallint; Value: Integer);
  2751. begin
  2752.   ControlInterface.Timeout[event] := Value;
  2753. end;
  2754.  
  2755. procedure TFTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  2756. begin
  2757.   ControlInterface.EnableTimer[event] := Value;
  2758. end;
  2759.  
  2760. function TFTP.Get_Errors: icErrors;
  2761. begin
  2762.   Result := ControlInterface.Errors;
  2763. end;
  2764.  
  2765. function TFTP.Get_DocInput: DocInput;
  2766. begin
  2767.   Result := ControlInterface.DocInput;
  2768. end;
  2769.  
  2770. function TFTP.Get_DocOutput: DocOutput;
  2771. begin
  2772.   Result := ControlInterface.DocOutput;
  2773. end;
  2774.  
  2775. function TFTP.Get_Firewall: IFirewall;
  2776. begin
  2777.   Result := ControlInterface.Firewall;
  2778. end;
  2779.  
  2780. class function CoHTMLElementCls.Create: HTMLElement;
  2781. begin
  2782.   Result := CreateComObject(Class_HTMLElementCls) as HTMLElement;
  2783. end;
  2784.  
  2785. class function CoHTMLElementCls.CreateRemote(const MachineName: string): HTMLElement;
  2786. begin
  2787.   Result := CreateRemoteComObject(MachineName, Class_HTMLElementCls) as HTMLElement;
  2788. end;
  2789.  
  2790. class function CoHTMLFormCls.Create: HTMLForm;
  2791. begin
  2792.   Result := CreateComObject(Class_HTMLFormCls) as HTMLForm;
  2793. end;
  2794.  
  2795. class function CoHTMLFormCls.CreateRemote(const MachineName: string): HTMLForm;
  2796. begin
  2797.   Result := CreateRemoteComObject(MachineName, Class_HTMLFormCls) as HTMLForm;
  2798. end;
  2799.  
  2800. class function CoHTMLFormsCls.Create: HTMLForms;
  2801. begin
  2802.   Result := CreateComObject(Class_HTMLFormsCls) as HTMLForms;
  2803. end;
  2804.  
  2805. class function CoHTMLFormsCls.CreateRemote(const MachineName: string): HTMLForms;
  2806. begin
  2807.   Result := CreateRemoteComObject(MachineName, Class_HTMLFormsCls) as HTMLForms;
  2808. end;
  2809.  
  2810. class function CoHTMLAttrCls.Create: HTMLAttr;
  2811. begin
  2812.   Result := CreateComObject(Class_HTMLAttrCls) as HTMLAttr;
  2813. end;
  2814.  
  2815. class function CoHTMLAttrCls.CreateRemote(const MachineName: string): HTMLAttr;
  2816. begin
  2817.   Result := CreateRemoteComObject(MachineName, Class_HTMLAttrCls) as HTMLAttr;
  2818. end;
  2819.  
  2820. class function CoHTMLAttrsCls.Create: HTMLAttrs;
  2821. begin
  2822.   Result := CreateComObject(Class_HTMLAttrsCls) as HTMLAttrs;
  2823. end;
  2824.  
  2825. class function CoHTMLAttrsCls.CreateRemote(const MachineName: string): HTMLAttrs;
  2826. begin
  2827.   Result := CreateRemoteComObject(MachineName, Class_HTMLAttrsCls) as HTMLAttrs;
  2828. end;
  2829.  
  2830. procedure THTML.InitControlData;
  2831. const
  2832.   CEventDispIDs: array[0..12] of Integer = (
  2833.     $FFFFFDA0, $000003F8, $000003F9, $00000001, $00000002, $00000227,
  2834.     $00000004, $00000005, $00000006, $00000007, $00000008, $00000009,
  2835.     $0000000A);
  2836.   CLicenseKey: array[0..36] of Word = (
  2837.     $0036, $0036, $0061, $0062, $0037, $0030, $0064, $0030, $002D, $0035,
  2838.     $0035, $0064, $0033, $002D, $0031, $0031, $0063, $0066, $002D, $0038,
  2839.     $0030, $0034, $0063, $002D, $0030, $0030, $0061, $0030, $0032, $0034,
  2840.     $0032, $0034, $0065, $0039, $0032, $0037, $0000);
  2841.   CFontIDs: array [0..7] of Integer = (
  2842.     $FFFFFE00, $0000001B, $0000001C, $0000001D, $0000001E, $0000001F,
  2843.     $00000020, $00000021);
  2844.   CControlData: TControlData = (
  2845.     ClassID: '{B7FC355E-8CE7-11CF-9754-00AA00C00908}';
  2846.     EventIID: '{B7FC355D-8CE7-11CF-9754-00AA00C00908}';
  2847.     EventCount: 13;
  2848.     EventDispIDs: @CEventDispIDs;
  2849.     LicenseKey: @CLicenseKey;
  2850.     Flags: $00000007;
  2851.     Version: 300;
  2852.     FontCount: 8;
  2853.     FontIDs: @CFontIDs);
  2854. begin
  2855.   ControlData := @CControlData;
  2856. end;
  2857.  
  2858. procedure THTML.InitControlInterface(const Obj: IUnknown);
  2859. begin
  2860.   FIntf := Obj as IHTML;
  2861. end;
  2862.  
  2863. procedure THTML.AboutBox;
  2864. begin
  2865.   ControlInterface.AboutBox;
  2866. end;
  2867.  
  2868. procedure THTML.RequestDoc(const URL: WideString);
  2869. begin
  2870.   ControlInterface.RequestDoc(URL);
  2871. end;
  2872.  
  2873. procedure THTML.RequestAllEmbedded;
  2874. begin
  2875.   ControlInterface.RequestAllEmbedded;
  2876. end;
  2877.  
  2878. procedure THTML.Cancel(Message: OleVariant);
  2879. begin
  2880.   ControlInterface.Cancel(Message);
  2881. end;
  2882.  
  2883. procedure THTML.BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant);
  2884. begin
  2885.   ControlInterface.BeginPrinting(hDC, x, y, Width, Height, DefaultHeaders, DefaultTitle);
  2886. end;
  2887.  
  2888. procedure THTML.PrintPage(hDC, PageNumber: Integer);
  2889. begin
  2890.   ControlInterface.PrintPage(hDC, PageNumber);
  2891. end;
  2892.  
  2893. procedure THTML.EndPrinting;
  2894. begin
  2895.   ControlInterface.EndPrinting;
  2896. end;
  2897.  
  2898. procedure THTML.AutoPrint(hDC: Integer);
  2899. begin
  2900.   ControlInterface.AutoPrint(hDC);
  2901. end;
  2902.  
  2903. function THTML.GetPlainText(selected, fancy: WordBool): WideString;
  2904. begin
  2905.   Result := ControlInterface.GetPlainText(selected, fancy);
  2906. end;
  2907.  
  2908. function THTML.HasSelection: WordBool;
  2909. begin
  2910.   Result := ControlInterface.HasSelection;
  2911. end;
  2912.  
  2913. procedure THTML.SelectAll;
  2914. begin
  2915.   ControlInterface.SelectAll;
  2916. end;
  2917.  
  2918. function THTML.Get_DocInput: DocInput;
  2919. begin
  2920.   Result := ControlInterface.DocInput;
  2921. end;
  2922.  
  2923. function THTML.Get_DocOutput: DocOutput;
  2924. begin
  2925.   Result := ControlInterface.DocOutput;
  2926. end;
  2927.  
  2928. function THTML.Get_Forms: HTMLForms;
  2929. begin
  2930.   Result := ControlInterface.Forms;
  2931. end;
  2932.  
  2933. function THTML.Get_IsPrintingDone(PageNumber: Integer): WordBool;
  2934. begin
  2935.   Result := ControlInterface.IsPrintingDone[PageNumber];
  2936. end;
  2937.  
  2938. function THTML.Get_Errors: icErrors;
  2939. begin
  2940.   Result := ControlInterface.Errors;
  2941. end;
  2942.  
  2943. function THTML.Get_hWnd: OLE_HANDLE;
  2944. begin
  2945.   Result := ControlInterface.hWnd;
  2946. end;
  2947.  
  2948. class function CoProxy.Create: IHttpProxy;
  2949. begin
  2950.   Result := CreateComObject(Class_Proxy) as IHttpProxy;
  2951. end;
  2952.  
  2953. class function CoProxy.CreateRemote(const MachineName: string): IHttpProxy;
  2954. begin
  2955.   Result := CreateRemoteComObject(MachineName, Class_Proxy) as IHttpProxy;
  2956. end;
  2957.  
  2958. procedure THTTP.InitControlData;
  2959. const
  2960.   CEventDispIDs: array[0..8] of Integer = (
  2961.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  2962.     $0000022C, $000003F8, $000003F9);
  2963.   CLicenseKey: array[0..36] of Word = (
  2964.     $0037, $0030, $0037, $0038, $0031, $0037, $0036, $0030, $002D, $0035,
  2965.     $0035, $0064, $0064, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  2966.     $0039, $0037, $0066, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  2967.     $0033, $0066, $0038, $0037, $0062, $0035, $0000);
  2968.   CControlData: TControlData = (
  2969.     ClassID: '{B7FC3563-8CE7-11CF-9754-00AA00C00908}';
  2970.     EventIID: '{B7FC3562-8CE7-11CF-9754-00AA00C00908}';
  2971.     EventCount: 9;
  2972.     EventDispIDs: @CEventDispIDs;
  2973.     LicenseKey: @CLicenseKey;
  2974.     Flags: $00000000;
  2975.     Version: 300;
  2976.     FontCount: 0;
  2977.     FontIDs: nil);
  2978. begin
  2979.   ControlData := @CControlData;
  2980. end;
  2981.  
  2982. procedure THTTP.InitControlInterface(const Obj: IUnknown);
  2983. begin
  2984.   FIntf := Obj as IHTTPCT;
  2985. end;
  2986.  
  2987. procedure THTTP.AboutBox;
  2988. begin
  2989.   ControlInterface.AboutBox;
  2990. end;
  2991.  
  2992. procedure THTTP.Cancel;
  2993. begin
  2994.   ControlInterface.Cancel;
  2995. end;
  2996.  
  2997. procedure THTTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2998. begin
  2999.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  3000. end;
  3001.  
  3002. procedure THTTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  3003. begin
  3004.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  3005. end;
  3006.  
  3007. function THTTP.Get_Timeout(event: Smallint): Integer;
  3008. begin
  3009.   Result := ControlInterface.Timeout[event];
  3010. end;
  3011.  
  3012. procedure THTTP.Set_Timeout(event: Smallint; Value: Integer);
  3013. begin
  3014.   ControlInterface.Timeout[event] := Value;
  3015. end;
  3016.  
  3017. procedure THTTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3018. begin
  3019.   ControlInterface.EnableTimer[event] := Value;
  3020. end;
  3021.  
  3022. function THTTP.Get_Errors: icErrors;
  3023. begin
  3024.   Result := ControlInterface.Errors;
  3025. end;
  3026.  
  3027. function THTTP.Get_DocInput: DocInput;
  3028. begin
  3029.   Result := ControlInterface.DocInput;
  3030. end;
  3031.  
  3032. function THTTP.Get_DocOutput: DocOutput;
  3033. begin
  3034.   Result := ControlInterface.DocOutput;
  3035. end;
  3036.  
  3037. function THTTP.Get_Proxy: IHttpProxy;
  3038. begin
  3039.   Result := ControlInterface.Proxy;
  3040. end;
  3041.  
  3042. procedure TNNTP.InitControlData;
  3043. const
  3044.   CEventDispIDs: array[0..15] of Integer = (
  3045.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3046.     $0000022C, $000003F8, $000003F9, $00000000, $00000001, $00000002,
  3047.     $00000003, $00000004, $00000005, $00000006);
  3048.   CLicenseKey: array[0..36] of Word = (
  3049.     $0038, $0036, $0063, $0033, $0065, $0038, $0038, $0030, $002D, $0035,
  3050.     $0035, $0039, $0035, $002D, $0031, $0031, $0063, $0066, $002D, $0039,
  3051.     $0036, $0065, $0037, $002D, $0030, $0030, $0038, $0030, $0063, $0037,
  3052.     $0063, $0033, $0063, $0032, $0038, $0034, $0000);
  3053.   CControlData: TControlData = (
  3054.     ClassID: '{B7FC3568-8CE7-11CF-9754-00AA00C00908}';
  3055.     EventIID: '{B7FC3567-8CE7-11CF-9754-00AA00C00908}';
  3056.     EventCount: 16;
  3057.     EventDispIDs: @CEventDispIDs;
  3058.     LicenseKey: @CLicenseKey;
  3059.     Flags: $00000000;
  3060.     Version: 300;
  3061.     FontCount: 0;
  3062.     FontIDs: nil);
  3063. begin
  3064.   ControlData := @CControlData;
  3065. end;
  3066.  
  3067. procedure TNNTP.InitControlInterface(const Obj: IUnknown);
  3068. begin
  3069.   FIntf := Obj as Inntpct;
  3070. end;
  3071.  
  3072. procedure TNNTP.AboutBox;
  3073. begin
  3074.   ControlInterface.AboutBox;
  3075. end;
  3076.  
  3077. procedure TNNTP.Cancel;
  3078. begin
  3079.   ControlInterface.Cancel;
  3080. end;
  3081.  
  3082. procedure TNNTP.Connect(RemoteHost, RemotePort: OleVariant);
  3083. begin
  3084.   ControlInterface.Connect(RemoteHost, RemotePort);
  3085. end;
  3086.  
  3087. procedure TNNTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  3088. begin
  3089.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  3090. end;
  3091.  
  3092. procedure TNNTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  3093. begin
  3094.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  3095. end;
  3096.  
  3097. procedure TNNTP.GetAdministrationFile(LastUpdate: OleVariant);
  3098. begin
  3099.   ControlInterface.GetAdministrationFile(LastUpdate);
  3100. end;
  3101.  
  3102. procedure TNNTP.SelectGroup(const groupName: WideString);
  3103. begin
  3104.   ControlInterface.SelectGroup(groupName);
  3105. end;
  3106.  
  3107. procedure TNNTP.SetNextArticle;
  3108. begin
  3109.   ControlInterface.SetNextArticle;
  3110. end;
  3111.  
  3112. procedure TNNTP.SetLastArticle;
  3113. begin
  3114.   ControlInterface.SetLastArticle;
  3115. end;
  3116.  
  3117. procedure TNNTP.GetArticleNumbers(groupName: OleVariant);
  3118. begin
  3119.   ControlInterface.GetArticleNumbers(groupName);
  3120. end;
  3121.  
  3122. procedure TNNTP.GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant);
  3123. begin
  3124.   ControlInterface.GetArticleHeaders(header, firstArticle, lastArticle);
  3125. end;
  3126.  
  3127. procedure TNNTP.GetArticleByArticleNumber(articleNumber: OleVariant);
  3128. begin
  3129.   ControlInterface.GetArticleByArticleNumber(articleNumber);
  3130. end;
  3131.  
  3132. procedure TNNTP.GetArticleByMessageID(const messageID: WideString);
  3133. begin
  3134.   ControlInterface.GetArticleByMessageID(messageID);
  3135. end;
  3136.  
  3137. procedure TNNTP.GetHeaderByArticleNumber(articleNumber: OleVariant);
  3138. begin
  3139.   ControlInterface.GetHeaderByArticleNumber(articleNumber);
  3140. end;
  3141.  
  3142. procedure TNNTP.GetHeaderByMessageID(const messageID: WideString);
  3143. begin
  3144.   ControlInterface.GetHeaderByMessageID(messageID);
  3145. end;
  3146.  
  3147. procedure TNNTP.GetBodyByArticleNumber(articleNumber: OleVariant);
  3148. begin
  3149.   ControlInterface.GetBodyByArticleNumber(articleNumber);
  3150. end;
  3151.  
  3152. procedure TNNTP.GetBodyByMessageID(const messageID: WideString);
  3153. begin
  3154.   ControlInterface.GetBodyByMessageID(messageID);
  3155. end;
  3156.  
  3157. procedure TNNTP.GetStatByArticleNumber(articleNumber: OleVariant);
  3158. begin
  3159.   ControlInterface.GetStatByArticleNumber(articleNumber);
  3160. end;
  3161.  
  3162. procedure TNNTP.GetOverviewFormat;
  3163. begin
  3164.   ControlInterface.GetOverviewFormat;
  3165. end;
  3166.  
  3167. procedure TNNTP.GetOverview(firstArticle, lastArticle: OleVariant);
  3168. begin
  3169.   ControlInterface.GetOverview(firstArticle, lastArticle);
  3170. end;
  3171.  
  3172. procedure TNNTP.ListGroups;
  3173. begin
  3174.   ControlInterface.ListGroups;
  3175. end;
  3176.  
  3177. procedure TNNTP.ListGroupDescriptions;
  3178. begin
  3179.   ControlInterface.ListGroupDescriptions;
  3180. end;
  3181.  
  3182. procedure TNNTP.ListNewGroups(LastUpdate: OleVariant);
  3183. begin
  3184.   ControlInterface.ListNewGroups(LastUpdate);
  3185. end;
  3186.  
  3187. procedure TNNTP.Quit;
  3188. begin
  3189.   ControlInterface.Quit;
  3190. end;
  3191.  
  3192. function TNNTP.Get_Timeout(event: Smallint): Integer;
  3193. begin
  3194.   Result := ControlInterface.Timeout[event];
  3195. end;
  3196.  
  3197. procedure TNNTP.Set_Timeout(event: Smallint; Value: Integer);
  3198. begin
  3199.   ControlInterface.Timeout[event] := Value;
  3200. end;
  3201.  
  3202. procedure TNNTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3203. begin
  3204.   ControlInterface.EnableTimer[event] := Value;
  3205. end;
  3206.  
  3207. function TNNTP.Get_Errors: icErrors;
  3208. begin
  3209.   Result := ControlInterface.Errors;
  3210. end;
  3211.  
  3212. function TNNTP.Get_DocInput: DocInput;
  3213. begin
  3214.   Result := ControlInterface.DocInput;
  3215. end;
  3216.  
  3217. function TNNTP.Get_DocOutput: DocOutput;
  3218. begin
  3219.   Result := ControlInterface.DocOutput;
  3220. end;
  3221.  
  3222. procedure TPOP.InitControlData;
  3223. const
  3224.   CEventDispIDs: array[0..13] of Integer = (
  3225.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3226.     $0000022C, $000003F9, $000009A1, $000009A2, $000009A3, $000009A4,
  3227.     $000009A6, $000009A7);
  3228.   CLicenseKey: array[0..36] of Word = (
  3229.     $0066, $0062, $0037, $0036, $0036, $0033, $0065, $0030, $002D, $0035,
  3230.     $0035, $0030, $0035, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3231.     $0036, $0037, $0036, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3232.     $0036, $0061, $0030, $0062, $0066, $0032, $0000);
  3233.   CControlData: TControlData = (
  3234.     ClassID: '{B7FC356E-8CE7-11CF-9754-00AA00C00908}';
  3235.     EventIID: '{B7FC356D-8CE7-11CF-9754-00AA00C00908}';
  3236.     EventCount: 14;
  3237.     EventDispIDs: @CEventDispIDs;
  3238.     LicenseKey: @CLicenseKey;
  3239.     Flags: $00000000;
  3240.     Version: 300;
  3241.     FontCount: 0;
  3242.     FontIDs: nil);
  3243. begin
  3244.   ControlData := @CControlData;
  3245. end;
  3246.  
  3247. procedure TPOP.InitControlInterface(const Obj: IUnknown);
  3248. begin
  3249.   FIntf := Obj as Ipopct;
  3250. end;
  3251.  
  3252. procedure TPOP.AboutBox;
  3253. begin
  3254.   ControlInterface.AboutBox;
  3255. end;
  3256.  
  3257. procedure TPOP.Cancel;
  3258. begin
  3259.   ControlInterface.Cancel;
  3260. end;
  3261.  
  3262. procedure TPOP.Connect(RemoteHost, RemotePort: OleVariant);
  3263. begin
  3264.   ControlInterface.Connect(RemoteHost, RemotePort);
  3265. end;
  3266.  
  3267. procedure TPOP.Authenticate(UserId, Password: OleVariant);
  3268. begin
  3269.   ControlInterface.Authenticate(UserId, Password);
  3270. end;
  3271.  
  3272. procedure TPOP.GetDoc(URL, Headers, OutputFile: OleVariant);
  3273. begin
  3274.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  3275. end;
  3276.  
  3277. procedure TPOP.MessageSize(MessageNumber: Smallint);
  3278. begin
  3279.   ControlInterface.MessageSize(MessageNumber);
  3280. end;
  3281.  
  3282. procedure TPOP.RetrieveMessage(MessageNumber: Smallint);
  3283. begin
  3284.   ControlInterface.RetrieveMessage(MessageNumber);
  3285. end;
  3286.  
  3287. procedure TPOP.Delete(MessageNumber: Smallint);
  3288. begin
  3289.   ControlInterface.Delete(MessageNumber);
  3290. end;
  3291.  
  3292. procedure TPOP.Reset;
  3293. begin
  3294.   ControlInterface.Reset;
  3295. end;
  3296.  
  3297. procedure TPOP.Last;
  3298. begin
  3299.   ControlInterface.Last;
  3300. end;
  3301.  
  3302. procedure TPOP.Noop;
  3303. begin
  3304.   ControlInterface.Noop;
  3305. end;
  3306.  
  3307. procedure TPOP.TopMessage(MessageNumber: Smallint);
  3308. begin
  3309.   ControlInterface.TopMessage(MessageNumber);
  3310. end;
  3311.  
  3312. procedure TPOP.Quit;
  3313. begin
  3314.   ControlInterface.Quit;
  3315. end;
  3316.  
  3317. procedure TPOP.RefreshMessageCount;
  3318. begin
  3319.   ControlInterface.RefreshMessageCount;
  3320. end;
  3321.  
  3322. function TPOP.Get_Timeout(event: Smallint): Integer;
  3323. begin
  3324.   Result := ControlInterface.Timeout[event];
  3325. end;
  3326.  
  3327. procedure TPOP.Set_Timeout(event: Smallint; Value: Integer);
  3328. begin
  3329.   ControlInterface.Timeout[event] := Value;
  3330. end;
  3331.  
  3332. procedure TPOP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3333. begin
  3334.   ControlInterface.EnableTimer[event] := Value;
  3335. end;
  3336.  
  3337. function TPOP.Get_Errors: icErrors;
  3338. begin
  3339.   Result := ControlInterface.Errors;
  3340. end;
  3341.  
  3342. function TPOP.Get_DocOutput: DocOutput;
  3343. begin
  3344.   Result := ControlInterface.DocOutput;
  3345. end;
  3346.  
  3347. procedure TSMTP.InitControlData;
  3348. const
  3349.   CEventDispIDs: array[0..12] of Integer = (
  3350.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3351.     $0000022C, $000003F8, $0000012C, $0000012D, $0000012E, $0000012F,
  3352.     $00000130);
  3353.   CLicenseKey: array[0..36] of Word = (
  3354.     $0062, $0037, $0034, $0034, $0034, $0065, $0065, $0030, $002D, $0035,
  3355.     $0035, $0062, $0065, $002D, $0031, $0031, $0063, $0066, $002D, $0039,
  3356.     $0036, $0065, $0037, $002D, $0030, $0030, $0038, $0030, $0063, $0037,
  3357.     $0063, $0033, $0063, $0032, $0038, $0034, $0000);
  3358.   CControlData: TControlData = (
  3359.     ClassID: '{B7FC3573-8CE7-11CF-9754-00AA00C00908}';
  3360.     EventIID: '{B7FC3572-8CE7-11CF-9754-00AA00C00908}';
  3361.     EventCount: 13;
  3362.     EventDispIDs: @CEventDispIDs;
  3363.     LicenseKey: @CLicenseKey;
  3364.     Flags: $00000000;
  3365.     Version: 300;
  3366.     FontCount: 0;
  3367.     FontIDs: nil);
  3368. begin
  3369.   ControlData := @CControlData;
  3370. end;
  3371.  
  3372. procedure TSMTP.InitControlInterface(const Obj: IUnknown);
  3373. begin
  3374.   FIntf := Obj as Ismtpct;
  3375. end;
  3376.  
  3377. procedure TSMTP.AboutBox;
  3378. begin
  3379.   ControlInterface.AboutBox;
  3380. end;
  3381.  
  3382. procedure TSMTP.Cancel;
  3383. begin
  3384.   ControlInterface.Cancel;
  3385. end;
  3386.  
  3387. procedure TSMTP.Connect(RemoteHost, RemotePort: OleVariant);
  3388. begin
  3389.   ControlInterface.Connect(RemoteHost, RemotePort);
  3390. end;
  3391.  
  3392. procedure TSMTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  3393. begin
  3394.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  3395. end;
  3396.  
  3397. procedure TSMTP.Reset;
  3398. begin
  3399.   ControlInterface.Reset;
  3400. end;
  3401.  
  3402. procedure TSMTP.Verify(const name: WideString);
  3403. begin
  3404.   ControlInterface.Verify(name);
  3405. end;
  3406.  
  3407. procedure TSMTP.Expand(const name: WideString);
  3408. begin
  3409.   ControlInterface.Expand(name);
  3410. end;
  3411.  
  3412. procedure TSMTP.Help(helpTopic: OleVariant);
  3413. begin
  3414.   ControlInterface.Help(helpTopic);
  3415. end;
  3416.  
  3417. procedure TSMTP.Noop;
  3418. begin
  3419.   ControlInterface.Noop;
  3420. end;
  3421.  
  3422. procedure TSMTP.Quit;
  3423. begin
  3424.   ControlInterface.Quit;
  3425. end;
  3426.  
  3427. function TSMTP.Get_Timeout(event: Smallint): Integer;
  3428. begin
  3429.   Result := ControlInterface.Timeout[event];
  3430. end;
  3431.  
  3432. procedure TSMTP.Set_Timeout(event: Smallint; Value: Integer);
  3433. begin
  3434.   ControlInterface.Timeout[event] := Value;
  3435. end;
  3436.  
  3437. procedure TSMTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3438. begin
  3439.   ControlInterface.EnableTimer[event] := Value;
  3440. end;
  3441.  
  3442. function TSMTP.Get_Errors: icErrors;
  3443. begin
  3444.   Result := ControlInterface.Errors;
  3445. end;
  3446.  
  3447. function TSMTP.Get_DocInput: DocInput;
  3448. begin
  3449.   Result := ControlInterface.DocInput;
  3450. end;
  3451.  
  3452. procedure TTCP.InitControlData;
  3453. const
  3454.   CEventDispIDs: array[0..6] of Integer = (
  3455.     $FFFFFDA0, $0000041B, $0000047F, $00000480, $00000483, $00000481,
  3456.     $00000482);
  3457.   CLicenseKey: array[0..36] of Word = (
  3458.     $0062, $0033, $0031, $0035, $0063, $0035, $0033, $0030, $002D, $0035,
  3459.     $0032, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3460.     $0061, $0061, $0032, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3461.     $0032, $0063, $0065, $0065, $0035, $0065, $0000);
  3462.   CControlData: TControlData = (
  3463.     ClassID: '{B7FC3584-8CE7-11CF-9754-00AA00C00908}';
  3464.     EventIID: '{B7FC3583-8CE7-11CF-9754-00AA00C00908}';
  3465.     EventCount: 7;
  3466.     EventDispIDs: @CEventDispIDs;
  3467.     LicenseKey: @CLicenseKey;
  3468.     Flags: $00000000;
  3469.     Version: 300;
  3470.     FontCount: 0;
  3471.     FontIDs: nil);
  3472. begin
  3473.   ControlData := @CControlData;
  3474. end;
  3475.  
  3476. procedure TTCP.InitControlInterface(const Obj: IUnknown);
  3477. begin
  3478.   FIntf := Obj as ITCP;
  3479. end;
  3480.  
  3481. procedure TTCP.AboutBox;
  3482. begin
  3483.   ControlInterface.AboutBox;
  3484. end;
  3485.  
  3486. procedure TTCP.Connect(RemoteHost, RemotePort: OleVariant);
  3487. begin
  3488.   ControlInterface.Connect(RemoteHost, RemotePort);
  3489. end;
  3490.  
  3491. procedure TTCP.Listen;
  3492. begin
  3493.   ControlInterface.Listen;
  3494. end;
  3495.  
  3496. procedure TTCP.Accept(requestID: Integer);
  3497. begin
  3498.   ControlInterface.Accept(requestID);
  3499. end;
  3500.  
  3501. procedure TTCP.SendData(data: OleVariant);
  3502. begin
  3503.   ControlInterface.SendData(data);
  3504. end;
  3505.  
  3506. procedure TTCP.GetData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant);
  3507. begin
  3508.   ControlInterface.GetData(data, type_, maxLen);
  3509. end;
  3510.  
  3511. procedure TTCP.PeekData(var  {IDL_In} data: OleVariant; type_, maxLen: OleVariant);
  3512. begin
  3513.   ControlInterface.PeekData(data, type_, maxLen);
  3514. end;
  3515.  
  3516. procedure TTCP.Close;
  3517. begin
  3518.   ControlInterface.Close;
  3519. end;
  3520.  
  3521.  
  3522. procedure TUDP.InitControlData;
  3523. const
  3524.   CEventDispIDs: array[0..1] of Integer = (
  3525.     $FFFFFDA0, $0000041B);
  3526.   CLicenseKey: array[0..36] of Word = (
  3527.     $0062, $0033, $0031, $0035, $0063, $0035, $0033, $0030, $002D, $0035,
  3528.     $0032, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3529.     $0061, $0061, $0032, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3530.     $0032, $0063, $0065, $0065, $0035, $0065, $0000);
  3531.   CControlData: TControlData = (
  3532.     ClassID: '{B7FC3587-8CE7-11CF-9754-00AA00C00908}';
  3533.     EventIID: '{B7FC3586-8CE7-11CF-9754-00AA00C00908}';
  3534.     EventCount: 2;
  3535.     EventDispIDs: @CEventDispIDs;
  3536.     LicenseKey: @CLicenseKey;
  3537.     Flags: $00000000;
  3538.     Version: 300;
  3539.     FontCount: 0;
  3540.     FontIDs: nil);
  3541. begin
  3542.   ControlData := @CControlData;
  3543. end;
  3544.  
  3545. procedure TUDP.InitControlInterface(const Obj: IUnknown);
  3546. begin
  3547.   FIntf := Obj as IUDP;
  3548. end;
  3549.  
  3550. procedure TUDP.AboutBox;
  3551. begin
  3552.   ControlInterface.AboutBox;
  3553. end;
  3554.  
  3555. procedure TUDP.SendData(data: OleVariant);
  3556. begin
  3557.   ControlInterface.SendData(data);
  3558. end;
  3559.  
  3560. procedure TUDP.GetData(var  {IDL_In} data: OleVariant; type_: OleVariant);
  3561. begin
  3562.   ControlInterface.GetData(data, type_);
  3563. end;
  3564.  
  3565.  
  3566.  
  3567.  
  3568. procedure Register;
  3569. begin
  3570.   RegisterComponents('Internet', [TFTP, THTML, THTTP, TNNTP, TPOP, TSMTP,
  3571.     TTCP, TUDP]);
  3572.   RegisterNonActiveX([TFTP, THTML, THTTP, TNNTP, TPOP, TSMTP,
  3573.     TTCP, TUDP]);
  3574. end;
  3575.  
  3576. end.
  3577.